[FFmpeg-devel] [PATCH 2/2] avcodec/hevc: set field_order=progressive when SPS makes it straightforward
Nicolas Gaullier
nicolas.gaullier at cji.paris
Fri Jan 29 19:24:01 EET 2021
---
libavcodec/hevcdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 92eb888033..2eaa683399 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -330,6 +330,8 @@ static void export_stream_params(HEVCContext *s, const HEVCSPS *sps)
avctx->has_b_frames = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics;
avctx->profile = sps->ptl.general_ptl.profile_idc;
avctx->level = sps->ptl.general_ptl.level_idc;
+ if (sps->ptl.general_ptl.progressive_source_flag && !sps->ptl.general_ptl.interlaced_source_flag)
+ avctx->field_order = AV_FIELD_PROGRESSIVE;
ff_set_sar(avctx, sps->vui.sar);
--
2.27.0.windows.1
More information about the ffmpeg-devel
mailing list