[FFmpeg-devel] [Patch] example/filtering_video.c Remove deprecated function avcodec_get_frame_default from filtering_video.c
anshul
anshul.ffmpeg at gmail.com
Tue Jan 21 13:22:04 CET 2014
On 01/21/2014 04:50 PM, Stefano Sabatini wrote:
> On date Tuesday 2014-01-21 16:01:22 +0530, anshul encoded:
>> Hi
>>
>> I have removed the avcodec_get_frame_default from git and put the
>> av_frame_unref
>> in file filtering_video.c
>>
>> Thanks
>> Anshul
>>
>> From 2075d6d554cb0aa3e4b51661060b2f544ba2dd45 Mon Sep 17 00:00:00 2001
>> From: Anshul Maheshwari <er.anshul.maheshwari at gmail.com>
>> Date: Tue, 21 Jan 2014 15:51:06 +0530
>> Subject: [PATCH] remove deprecated function avcodec_get_frame_defaults and
>> replaced it by av_frame_unref
>>
>> ---
>> doc/examples/filtering_video.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c
>> index 790c641..8d3e7a8 100644
>> --- a/doc/examples/filtering_video.c
>> +++ b/doc/examples/filtering_video.c
>> @@ -215,7 +215,7 @@ int main(int argc, char **argv)
>> break;
>>
>> if (packet.stream_index == video_stream_index) {
>> - avcodec_get_frame_defaults(frame);
>> + av_frame_unref(frame);
> What's the point of av_frame_unref() here?
>
>> got_frame = 0;
>> ret = avcodec_decode_video2(dec_ctx, frame, &got_frame, &packet);
>> if (ret < 0) {
It would set the default values of frame, I have not looked inside the
avcodec_decode_video2 so cant say whether inside it actually need it as frame set to default value.
Thanks
Anshul
More information about the ffmpeg-devel
mailing list