MPEG seek crash (was: [Ffmpeg-devel] Re: Compiling FFmpeg using ISO/C89 compiler)

Michael Niedermayer michaelni
Sat Dec 9 17:09:50 CET 2006


Hi

On Sat, Dec 09, 2006 at 12:07:34PM +0100, Reimar D?ffinger wrote:
> Hello,
> On Fri, Dec 08, 2006 at 05:28:57PM +0100, Baptiste Coudurier wrote:
> > If my chems1.vob is the same one, and anyway it should not crash indeed.
> > I confirm that ffplay_g crash with current svn.
> > 
> > Log attached. Hope this helps.
> 
> Can you test attached patch? I guess it is a bit hackish, but I'd really
> like to know what kind of effect it has *g*
> 
> Greetings,
> Reimar D?ffinger

> Index: libavcodec/mpegvideo.c
> ===================================================================
> --- libavcodec/mpegvideo.c	(revision 7261)
> +++ libavcodec/mpegvideo.c	(working copy)
> @@ -3905,6 +3905,8 @@
>          return;
>      }
>  #endif
> +    if (!s->last_picture.data) s->mv_dir &= ~MV_DIR_FORWARD;
> +    if (!s->next_picture.data) s->mv_dir &= ~MV_DIR_BACKWARD;
>  

IMHO if either reference frame of a b frame is unavailable then either
A. drop it (easy and logic, and not terribly noticeable)
B. for every MB
    * if its bidir drop the vector for an unavailable frame
    * if its forward or backward and the reference is unavailable
      flip the motion vector (* -1 * difference in temporal distance)
    * if neither reference is available drop the b frame
C. some more complex temporal iterpolation based on available motion vectors

and my guess would be that B would look bad for most mpeg2 files as most
mpeg2 encoders are trash and select bad motion vectors ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali




More information about the ffmpeg-devel mailing list