Commit 90606b9f authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by Tim-Philipp Müller
Browse files

videoparseutils: Fix for wrong CEA708 minimum size check

The minimum possible size of valid CEA708 data is 3 bytes, not 7 bytes

Part-of: <gstreamer/gst-plugins-bad!2507>
parent 689efff2
......@@ -142,7 +142,11 @@ gst_video_parse_user_data (GstElement * elt, GstVideoParseUserData * user_data,
}
switch (user_data_type_code) {
case A53_USER_DATA_TYPE_CODE_CC_DATA:
if (gst_byte_reader_get_remaining (br) < 7) {
/* 1 (cc count byte) +
* 1 (reserved byte, 0xff) +
* 1 (marker_bits, 0xff)
*/
if (gst_byte_reader_get_remaining (br) < 3) {
GST_WARNING_OBJECT (elt,
"Closed caption data packet too short, ignoring");
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment