[FFmpeg-devel] [PATCH] API changes in ffmpeg.c
Thilo Borgmann
thilo.borgmann
Fri Apr 10 21:11:10 CEST 2009
Michael Niedermayer schrieb:
> On Fri, Apr 10, 2009 at 08:29:25PM +0200, Thilo Borgmann wrote:
>
>> Michael Niedermayer schrieb:
>>
>>>
>>>
>>>>>> &picture, &got_picture, ptr, len);
>>>>>> + ret = avcodec_decode_video2(ist->st->codec,
>>>>>> + &picture, &got_picture,
>>>>>> pkt);
>>>>>>
>>>>>>
>>>>> Crash here.
>>>>>
>>>>>
>>>> This is revision 1 which fixes the crash during make test.
>>>>
>>>>
>>> probably ok if tested
>>>
>>>
>>>
>> Although applied, I tested it again using ffmpeg for transcoding the
>> corepng.avi into yuv format.
>>
>> This revealed a bug in my ffmpeg.c patch, but this bug breaks CorePNG
>> decoding only, since this is the only one using more information of the
>> provided packet than .data and .size attributes.
>>
>> FFplay is not broken as it uses no local AVPackets but the "original" one.
>>
>> I attached a little patch for the time being, but I would propose to add a
>> "av_copy_packet" function into libavcodec/avpacket.c as future codecs will
>> also use more attributes of the avpacket and even others than just the
>> .flags attribute.
>>
>
> patch ok
>
While I was thinking about a possible copy function, I realized that a
shallow copy would be enough here, so a simple avpkt = *pkt will do. A
function for a deep copy is not yet needed so I'm not going to add one.
Reinspecting ffmpeg.c, revision 1 does solve it best in my eyes, so the
last patch here has become obsolete, if Michael agrees.
Of course, this new patch has been tested using "make test" and the
transcoding into yuv.
TB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tb.ffmpegHotfix.rev1.patch
Type: text/x-patch
Size: 884 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090410/b5afd1f1/attachment.bin>
More information about the ffmpeg-devel
mailing list