diff options
author | Zhao Zhili <quinkblack@foxmail.com> | 2022-05-13 17:40:49 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2022-05-24 18:03:12 +0800 |
commit | 5a7a33f6f24e08470bfce2dee020da7b2f6a9b50 (patch) | |
tree | e9fbb296558b845d56c393d02e4c92b2312c732f /libavcodec/libdavs2.c | |
parent | 8379e454e0125f2a89328636a95e3183a670c300 (diff) | |
download | ffmpeg-5a7a33f6f24e08470bfce2dee020da7b2f6a9b50.tar.gz |
avcodec/libdavs2: export has_b_frames info
More precisely, we should use picture_reorder_delay, but it's
unavailable yet.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'libavcodec/libdavs2.c')
-rw-r--r-- | libavcodec/libdavs2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c index a47027d300..bc31745a4f 100644 --- a/libavcodec/libdavs2.c +++ b/libavcodec/libdavs2.c @@ -78,6 +78,12 @@ static int davs2_dump_frames(AVCodecContext *avctx, davs2_picture_t *pic, int *g avctx->height = headerset->height; avctx->pix_fmt = headerset->output_bit_depth == 10 ? AV_PIX_FMT_YUV420P10 : AV_PIX_FMT_YUV420P; + /* It should be picture_reorder_delay, but libdavs2 doesn't export that + * info. + * Use FFMAX since has_b_frames could be set by AVS2 parser in theory, + * which doesn't do it yet. + */ + avctx->has_b_frames = FFMAX(avctx->has_b_frames, !headerset->low_delay); avctx->framerate = av_d2q(headerset->frame_rate,4096); *got_frame = 0; |