[FFmpeg-devel] [PATCH] lavc/libxavs2.c: mark key-frame packets

Michael Niedermayer michael at niedermayer.cc
Tue Jul 28 22:51:31 EEST 2020


On Mon, Jul 27, 2020 at 04:57:29PM +0800, Steven Liu wrote:
> hwren <hwrenx at 126.com> 于2020年7月27日周一 下午3:59写道:
> >
> >
> 
> >
> > 在 2020-07-27 15:26:24,"Steven Liu" <lingjiujianke at gmail.com> 写道:
> > ><hwrenx at 126.com> 于2020年7月27日周一 下午2:22写道:
> > >>
> > >> From: hwren <hwrenx at 126.com>
> > >>
> > >> Signed-off-by: hwren <hwrenx at 126.com>
> > >> ---
> > >>  libavcodec/libxavs2.c | 6 ++++++
> > >>  1 file changed, 6 insertions(+)
> > >>
> > >> diff --git a/libavcodec/libxavs2.c b/libavcodec/libxavs2.c
> > >> index 76b57e731e..8519f6925a 100644
> > >> --- a/libavcodec/libxavs2.c
> > >> +++ b/libavcodec/libxavs2.c
> > >> @@ -223,6 +223,12 @@ static int xavs2_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
> > >>          pkt->pts = cae->packet.pts;
> > >>          pkt->dts = cae->packet.dts;
> > >>
> > >> +        if (cae->packet.type == XAVS2_TYPE_IDR ||
> > >> +            cae->packet.type == XAVS2_TYPE_I ||
> > >Don't support OpenGOP?
> >
> > There is no obvious difference between IDR/I frame in AVS2. Actually we will use TYPE_I in most cases.
> > So I think, when a jump occurs, ffmpeg just needs to find the closest I frame. Then the decoder will
> > determine the validity and discard the illegal frames. This method may trigger some error reports,
> > but they should be harmless.
> 
> Looks ok then.

will apply

thx

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

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200728/ad06c10f/attachment.sig>


More information about the ffmpeg-devel mailing list