From a4f459fe218a53107ecd99ef91a8c67867b5fcdf Mon Sep 17 00:00:00 2001 From: He Junyan Date: Fri, 9 Oct 2020 16:01:35 +0800 Subject: [PATCH] codecparsers: av1: clean the seen_frame_header in parse_tile_group(). The current seen_frame_header is not cleaned correctly. According to the spec, it should be cleaned when tiles are parsed completely. Also delete a verbose seen_frame_header init in reset_state(). Part-of: --- gst-libs/gst/codecparsers/gstav1parser.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/gst-libs/gst/codecparsers/gstav1parser.c b/gst-libs/gst/codecparsers/gstav1parser.c index 0cd579738d..e1658dfc93 100644 --- a/gst-libs/gst/codecparsers/gstav1parser.c +++ b/gst-libs/gst/codecparsers/gstav1parser.c @@ -520,7 +520,6 @@ av1_parser_init_sequence_header (GstAV1SequenceHeaderOBU * seq_header) static void gst_av1_parse_reset_state (GstAV1Parser * parser, gboolean free_sps) { - parser->state.seen_frame_header = 0; parser->state.begin_first_frame = FALSE; parser->state.prev_frame_id = 0; @@ -4460,14 +4459,15 @@ gst_av1_parse_tile_group (GstAV1Parser * parser, GstBitReader * br, } } - /* Not implement here, the real decoder process - if (tile_group->tg_end == tile_group->num_tiles - 1) { - if ( !disable_frame_end_update_cdf ) { - frame_end_update_cdf( ) - } - decode_frame_wrapup( ) - } - */ + if (tile_group->tg_end == tile_group->num_tiles - 1) { + /* Not implement here, the real decoder process + if ( !disable_frame_end_update_cdf ) { + frame_end_update_cdf( ) + } + decode_frame_wrapup( ) + */ + parser->state.seen_frame_header = 0; + } return GST_AV1_PARSER_OK; @@ -4629,7 +4629,6 @@ gst_av1_parser_parse_frame_obu (GstAV1Parser * parser, GstAV1OBU * obu, return GST_AV1_PARSER_NO_MORE_DATA; retval = gst_av1_parse_tile_group (parser, &bit_reader, &(frame->tile_group)); - parser->state.seen_frame_header = 0; return retval; }