[FFmpeg-devel] Google Summer of Code participation

Thilo Borgmann thilo.borgmann
Wed Apr 8 02:00:24 CEST 2009



Michael Niedermayer schrieb:
>> Alternatively I can change the function in place and the calling 
>> av_find_stream_info too, maybe in a seperate patch... this would avoid 
>> unnecessary "crowding"...
>>     
>
> yes please do
>
>   
This is patch "tb.changedTry_decode_frame.patch" then.




Michael Niedermayer schrieb:
>
>> @@ -1586,9 +1586,9 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
>>          /* NOTE: the audio packet can contain several frames */
>>          while (is->audio_pkt_size > 0) {
>>              data_size = sizeof(is->audio_buf1);
>> -            len1 = avcodec_decode_audio2(dec,
>> +            len1 = avcodec_decode_audio3(dec,
>>                                          (int16_t *)is->audio_buf1, &data_size,
>> -                                        is->audio_pkt_data, is->audio_pkt_size);
>> +                                        pkt);
>>              if (len1 < 0) {
>>                  /* if error, we skip the frame */
>>                  is->audio_pkt_size = 0;
>>     
>
> is that the same?
>
>   
Fixed in revision 2.
The last two lines which are altered in ffplay.c (audio_decode_frame):
::::
-        is->audio_pkt_data = pkt->data;
-        is->audio_pkt_size = pkt->size;
+        avpkt.data = pkt->data;
+        avpkt.size = pkt->size;
::::
These may have become deprecated now, as the original 
is->audio_pkt_{data,size} are not changed anymore. I may be wrong but I 
think these two lines are for cleaning up. If I'm right, these can be 
deleted now but I'm not 110% sure about that, may be you'll have a look.

TB

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tb.changedTry_decode_frame.patch
Type: text/x-patch
Size: 1830 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090408/1f2dc80f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tb.APICalls.rev2.patch
Type: text/x-patch
Size: 12083 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090408/1f2dc80f/attachment-0001.bin>



More information about the ffmpeg-devel mailing list