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

Limin Wang lance.lmwang
Thu Jul 23 03:08:04 CEST 2009


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



More information about the ffmpeg-devel mailing list