[FFmpeg-devel] libavcodec/mpeg12.c Problem showed up in SVN-r18959

Greg McCrory greg01
Thu Jul 23 04:00:15 CEST 2009


On 07/22/2009 08:08 PM, Limin Wang wrote:
> Hi,
>
>
> * Greg McCrory<greg01 at coolbrew.com>  [2009-07-22 16:29:39 -0500]:
>
>    
>> Index: libavcodec/mpeg12.c
>> ===================================================================
>> --- libavcodec/mpeg12.c (revision 18958)
>> +++ libavcodec/mpeg12.c (revision 18959)
>> @@ -2226,7 +2226,7 @@
>>                   }
>>               }
>>               if(s&&  state == PICTURE_START_CODE){
>> -                ff_fetch_timestamp(s, i-4, 1);
>> +                ff_fetch_timestamp(s, i-3, 1);
>>               }
>>           }
>>       }
>>      
>
> I have got one mpeg2 samples has problem before and I use below
> patch to fix it. Maybe you can try it whether it's same problem.
>
>
> --- libavcodec/mpeg12.c (?? 19500)
> +++ libavcodec/mpeg12.c (????)
> @@ -2224,8 +2224,10 @@
>                       return i-3;
>                   }
>               }
> -            if(s&&  state == PICTURE_START_CODE){
> -                ff_fetch_timestamp(s, i-3, 1);
> +
> +            if(s&&  s->fetch_timestamp&&   state == PICTURE_START_CODE){
> +                ff_fetch_timestamp(s, i-4, 1);
> +                s->fetch_timestamp=0;
>               }
>           }
>       }
>
>
> Thanks,
> Limin
>    

Sorry, no.  Still exhibits same jitter problem.

This, however works beautifully with ntsc-dvd mpeg2 video:

             if(s && state == PICTURE_START_CODE){
                 ff_fetch_timestamp(s, i-4, 1);
             }

Like I said, I don't know enough about what going on to understand why, 
I just know that it works.

GMc




More information about the ffmpeg-devel mailing list