Message ID | 20170930032257.14867-1-zhong.li@intel.com |
---|---|
State | Accepted |
Commit | fd7cb86468cc63b5bda203d74964584281318cda |
Headers | show |
On Sat, Sep 30, 2017 at 11:22:57AM +0800, Zhong Li wrote: > It is to fix https://trac.ffmpeg.org/ticket/6677. Actucally it is a > regression of commit 99e07a4453732058df90885f80b3db3b4f37cb3c which > always inserts a dummy frame when decode the first key field picture. > > Signed-off-by: Zhong Li <zhong.li@intel.com> > --- > libavcodec/mpegvideo.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) applied please add a fate test thanks [...]
> -----Original Message----- > From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf > Of Michael Niedermayer > Sent: Wednesday, October 4, 2017 8:16 AM > To: FFmpeg development discussions and patches > <ffmpeg-devel@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] mpegdec: fix redundant dummy frames > issue of interlaced clips > > On Sat, Sep 30, 2017 at 11:22:57AM +0800, Zhong Li wrote: > > It is to fix https://trac.ffmpeg.org/ticket/6677. Actucally it is a > > regression of commit 99e07a4453732058df90885f80b3db3b4f37cb3c > which > > always inserts a dummy frame when decode the first key field picture. > > > > Signed-off-by: Zhong Li <zhong.li@intel.com> > > --- > > libavcodec/mpegvideo.c | 6 +----- > > 1 file changed, 1 insertion(+), 5 deletions(-) > > applied > > please add a fate test > Thank for remind. FATE test will be added. > thanks > > [...] > -- > Michael GnuPG fingerprint: > 9FF2128B147EF6730BADF133611EC787040B0FAB > > Elect your leaders based on what they did after the last election, not based > on what they say before an election.
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 82b94253ae..c4089972f0 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1283,8 +1283,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) s->pict_type, s->droppable); if ((!s->last_picture_ptr || !s->last_picture_ptr->f->buf[0]) && - (s->pict_type != AV_PICTURE_TYPE_I || - s->picture_structure != PICT_FRAME)) { + (s->pict_type != AV_PICTURE_TYPE_I)) { int h_chroma_shift, v_chroma_shift; av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt, &h_chroma_shift, &v_chroma_shift); @@ -1294,9 +1293,6 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) else if (s->pict_type != AV_PICTURE_TYPE_I) av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n"); - else if (s->picture_structure != PICT_FRAME) - av_log(avctx, AV_LOG_DEBUG, - "allocate dummy last picture for field based first keyframe\n"); /* Allocate a dummy frame */ i = ff_find_unused_picture(s->avctx, s->picture, 0);
It is to fix https://trac.ffmpeg.org/ticket/6677. Actucally it is a regression of commit 99e07a4453732058df90885f80b3db3b4f37cb3c which always inserts a dummy frame when decode the first key field picture. Signed-off-by: Zhong Li <zhong.li@intel.com> --- libavcodec/mpegvideo.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)