MPEG seek crash (was: [Ffmpeg-devel] Re: Compiling FFmpeg using ISO/C89 compiler)
Sat Dec 9 17:47:55 CET 2006
On Sat, Dec 09, 2006 at 05:09:50PM +0100, Michael Niedermayer wrote:
> On Sat, Dec 09, 2006 at 12:07:34PM +0100, Reimar D?ffinger wrote:
> > 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 ...
if (s->mv_dir & MV_DIR_FORWARD && !s->last_picture.data) return;
if (s->mv_dir & MV_DIR_BACKWARD && !s->next_picture.data) return;
Instead of the above?
Either way, I do not yet even know if either one helps at all *g*
More information about the ffmpeg-devel