[FFmpeg-devel] [PATCH v2 7/9] cbs_av1: Fill context information for show-existing-frame
Mark Thompson
sw at jkqxz.net
Tue Apr 2 02:39:38 EEST 2019
---
libavcodec/cbs_av1_syntax_template.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
index 76eb90b279..a9bf78e4ad 100644
--- a/libavcodec/cbs_av1_syntax_template.c
+++ b/libavcodec/cbs_av1_syntax_template.c
@@ -1146,6 +1146,22 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
fb(3, frame_to_show_map_idx);
frame = &priv->ref[current->frame_to_show_map_idx];
+ if (!frame->valid) {
+ av_log(ctx->log_ctx, AV_LOG_ERROR,
+ "Missing reference frame needed to show existing frame "
+ "(frame_to_show_map_idx = %d).\n",
+ current->frame_to_show_map_idx);
+ return AVERROR_INVALIDDATA;
+ }
+
+ priv->bit_depth = frame->bit_depth;
+ priv->frame_width = frame->frame_width;
+ priv->frame_height = frame->frame_height;
+ priv->upscaled_width = frame->upscaled_width;
+ priv->render_width = frame->render_width;
+ priv->render_height = frame->render_height;
+
+ infer(frame_type, frame->frame_type);
if (seq->decoder_model_info_present_flag &&
!seq->timing_info.equal_picture_interval) {
--
2.20.1
More information about the ffmpeg-devel
mailing list