From d90e353daa9282b0af03a2cccdcbe80beb2f25c4 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Thu, 24 Sep 2020 01:24:40 +0800 Subject: [PATCH] codecparsers: vp8parser: clear the frame_hdr before parsing. Uninited frame_hdr may have garbage and may contain some wrong results after the parsing process. Part-of: --- gst-libs/gst/codecparsers/gstvp8parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/codecparsers/gstvp8parser.c b/gst-libs/gst/codecparsers/gstvp8parser.c index 7176476615..2de34f0b95 100644 --- a/gst-libs/gst/codecparsers/gstvp8parser.c +++ b/gst-libs/gst/codecparsers/gstvp8parser.c @@ -535,6 +535,8 @@ gst_vp8_parser_parse_frame_header (GstVp8Parser * parser, g_return_val_if_fail (frame_hdr != NULL, GST_VP8_PARSER_ERROR); g_return_val_if_fail (parser != NULL, GST_VP8_PARSER_ERROR); + memset (frame_hdr, 0, sizeof (GstVp8FrameHdr)); + /* Uncompressed Data Chunk */ gst_byte_reader_init (&br, data, size);