summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2020-09-24 01:24:40 +0800
committerHe Junyan <junyan.he@intel.com>2020-09-25 17:07:43 +0800
commitd90e353daa9282b0af03a2cccdcbe80beb2f25c4 (patch)
treee3613702e427f8656adda6306a2511081e496490 /gst-libs
parent709bec8f07dcf3f280001ca056139c8a357e7d61 (diff)
downloadgstreamer-plugins-bad-d90e353daa9282b0af03a2cccdcbe80beb2f25c4.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1587>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/codecparsers/gstvp8parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst-libs/gst/codecparsers/gstvp8parser.c b/gst-libs/gst/codecparsers/gstvp8parser.c
index 717647661..2de34f0b9 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);