On 4/1/2019 8:39 PM, Mark Thompson wrote:
> ---
>  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;

Right, so if you use the frame header returned by
ff_cbs_parse_headers(), then frames with show_existing_frame == 1 would
not have the relevant values set. Hence using CodedBitstreamAV1Context
in patch 8/9.

Using infer() for these like you're doing for frame_type below would be
a solution, i think.

> +            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) {
> 

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to