[FFmpeg-devel] [PATCH] API changes in ffmpeg.c

Thilo Borgmann thilo.borgmann
Fri Apr 10 15:03:53 CEST 2009


Stefano Sabatini schrieb:
> On date Friday 2009-04-10 13:55:52 +0200, Thilo Borgmann encoded:
>   
>> Ok a new thread for the API changes in ffmpeg.c, cut off from the  
>> original thread:
>>
>> Stefano Sabatini schrieb:
>>     
>>> On date Wednesday 2009-04-08 16:09:01 +0200, Thilo Borgmann encoded:
>>> [...]
>>>   
>>>       
>>>> diff --git a/ffmpeg.c b/ffmpeg.c
>>>> index cb15120..4944811 100644
>>>> --- a/ffmpeg.c
>>>> +++ b/ffmpeg.c
>>>> ...
>>>> -                ptr += ret;
>>>> -                len -= ret;
>>>> +                avpkt.data += ret;
>>>> +                avpkt.size -= ret;
>>>>                  /* Some bug in mpeg audio decoder gives */
>>>>                  /* data_size < 0, it seems they are overflows */
>>>>                  if (data_size <= 0) {
>>>> @@ -1245,8 +1247,8 @@ static int output_packet(AVInputStream *ist, int ist_index,
>>>>                      /* XXX: allocate picture correctly */
>>>>                      avcodec_get_frame_defaults(&picture);
>>>>  -                    ret = avcodec_decode_video(ist->st->codec,
>>>> -                                               &picture, &got_picture, ptr, len);
>>>> +                    ret = avcodec_decode_video2(ist->st->codec,
>>>> +                                               &picture, &got_picture, pkt);
>>>>     
>>>>         
>>> Crash here.
>>>
>>> Make sure you test your patches with make test before to submit them.
>>>       
> [...]
>   
>> Crash fixed, revision 1 of the patch attached. More comments on this  
>> already posted in the originating thread.
>>     
>
> The changes required were trivial and the original one was already
> OKed, so tested and applied.
>
> Regards.
>   
Ok thanks. Finally, after all the confusion about new thread etc., there 
is just one patch left, the "tb.CorePNG.rev3.patch". I repost the last 
status here for convenience:

>
>
> Michael Niedermayer schrieb:
>> looks fine if tested
>>
>>   
> I tested this with the corepng.avi from here:
> http://samples.mplayerhq.hu/V-codecs/PNG1/
>
> Unfortunately this is the only file I know of.

If this requires a new thread, I will open one.

TB



More information about the ffmpeg-devel mailing list