[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec mpeg12.c,1.248,1.249
Ivan Kalvachev
ikalvachev
Thu Mar 2 15:30:27 CET 2006
2006/3/2, Michael Niedermayer <michaelni at gmx.at>:
> Hi
>
> On Thu, Mar 02, 2006 at 10:18:38AM +0200, Ivan Kalvachev wrote:
> > 2006/3/2, Michael Niedermayer CVS <michael at mplayerhq.hu>:
> > > Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
> > > In directory mail:/var2/tmp/cvs-serv31999
> > >
> > > Modified Files:
> > > mpeg12.c
> > > Log Message:
> > > fix decoding of mpeg2-trunc.vob
> > >
> > >
> > > Index: mpeg12.c
> > > ===================================================================
> > > RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpeg12.c,v
> > > retrieving revision 1.248
> > > retrieving revision 1.249
> > > diff -u -d -r1.248 -r1.249
> > > --- mpeg12.c 4 Feb 2006 20:32:02 -0000 1.248
> > > +++ mpeg12.c 1 Mar 2006 22:59:22 -0000 1.249
> > > @@ -3114,7 +3114,7 @@
> > > /* skip b frames if we dont have reference frames */
> > > if(s2->pict_type==B_TYPE) break;
> > > /* skip P frames if we dont have reference frame no valid header */
> > > - if(s2->pict_type==P_TYPE && !s2->first_slice) break;
> > > +// if(s2->pict_type==P_TYPE && s2->first_field && !s2->first_slice) break;
> > > }
> >
> > If I get it right, this is for the case where the second field is
> > P_TYPE and compensates from the first field that is I_TYPE, all in the
> > first frame.
>
> yes
>
>
> >
> > So I wonder why the new code is commented out?
>
> imagine a stream without I frames but plenty of intra blocks in p frames ...
I can imagine stream with only B-pictures that contain only INTRA_MB,
but this doesn't mean lavc will decode it or that it is valid stream.
;)
So either:
1. remove the comment for p-picture
2. comment the similar b-picture code and the assert() in
MPV_frame_start() that triggers on reference-less b pictures.
I am in favor of 2.
More information about the ffmpeg-cvslog
mailing list