[FFmpeg-devel] BUG in mpeg video decoding? ...

Luca Abeni lucabe72
Mon Jun 8 14:12:06 CEST 2009


Hi Michael,

Michael Niedermayer wrote:
[...]
>>  mpegvideo.c |   15 ++++++++++++---
>>  1 file changed, 12 insertions(+), 3 deletions(-)
>> a7f886697c278bfae0b1501bb5e0e5239e4abcb7  maybe_fix_decoder_pts-1.diff
>> Index: libavcodec/mpegvideo.c
>> ===================================================================
>> --- libavcodec/mpegvideo.c	(revision 19128)
>> +++ libavcodec/mpegvideo.c	(working copy)
>> @@ -819,14 +819,23 @@
>>  
>>      if(shared){
>>          for(i=0; i<MAX_PICTURE_COUNT; i++){
>> -            if(s->picture[i].data[0]==NULL && s->picture[i].type==0) return i;
>> +            if(s->picture[i].data[0]==NULL && s->picture[i].type==0) {
>> +                avcodec_get_frame_defaults((AVFrame *)&s->picture[i]);
>> +                return i;
>> +            }
>>          }
> 
> can it also be done during codec init?

Ah, I knew I was missing something! :) New patch attached (this looks cleaner,
and this time I also ran "make test": no regressions detected).


				Luca
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: maybe_fix_decoder_pts-2.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090608/1438e5e0/attachment.txt>



More information about the ffmpeg-devel mailing list