[FFmpeg-cvslog] Don't mark generated dummy frame output from mpeg1/2 decoder as keyframe.

Michael Niedermayer michaelni at gmx.at
Sat Jul 16 19:21:55 CEST 2011


On Sat, Jul 16, 2011 at 05:47:25PM +0300, Ivan Kalvachev wrote:
> On 7/16/11, elupus <git at videolan.org> wrote:
> > ffmpeg | branch: master | elupus <elupus at xbmc.org> | Fri Apr 22 15:42:51
> > 2011 +0200| [900321b08c95bd42e6db53864bfffbe48d6019da] | committer: Joakim
> > Plate
> >
> > Don't mark generated dummy frame output from mpeg1/2 decoder as keyframe.
> >
> > We use this flag to tell when to assume decoded data is free
> > from artifacts after a seek. The mpeg1/2 decoder will generate
> > a dummy frame if decoding is started on a non keyframe. This
> > will sadly be output from decoder to player and displayed
> > as a gray screen.
> >
> >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=900321b08c95bd42e6db53864bfffbe48d6019da
> > ---
> >
> >  libavcodec/mpegvideo.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
> > index d3540c9..3749fd9 100644
> > --- a/libavcodec/mpegvideo.c
> > +++ b/libavcodec/mpegvideo.c
> > @@ -1114,6 +1114,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext
> > *avctx)
> >              /* Allocate a dummy frame */
> >              i= ff_find_unused_picture(s, 0);
> >              s->last_picture_ptr= &s->picture[i];
> > +            s->last_picture_ptr->key_frame = 0;
> >              if(ff_alloc_picture(s, s->last_picture_ptr, 0) < 0)
> >                  return -1;
> >              ff_thread_report_progress((AVFrame*)s->last_picture_ptr,
> > INT_MAX, 0);
> > @@ -1123,6 +1124,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext
> > *avctx)
> >              /* Allocate a dummy frame */
> >              i= ff_find_unused_picture(s, 0);
> >              s->next_picture_ptr= &s->picture[i];
> > +            s->next_picture_ptr->key_frame = 0;
> >              if(ff_alloc_picture(s, s->next_picture_ptr, 0) < 0)
> >                  return -1;
> >              ff_thread_report_progress((AVFrame*)s->next_picture_ptr,
> > INT_MAX, 0);
> 
> This breaks compilation thanks to the recent Diego's "cleanup".

either way, please everyone run a make [-j123] fate before git pushing
that is unless its a really trivial commit like just changing a comment

thx

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

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20110716/97451b11/attachment.asc>


More information about the ffmpeg-cvslog mailing list