mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
qtdemux: Check for data size when parsing h264 codec data from strf atom
This commit is contained in:
parent
722ef42196
commit
47ed79fb1c
1 changed files with 10 additions and 7 deletions
|
@ -7357,6 +7357,9 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
|
|||
* are the fourcc, next 40 bytes are BITMAPINFOHEADER,
|
||||
* next 1 byte is the version, and the
|
||||
* subsequent bytes are sequence parameter set like data. */
|
||||
|
||||
size -= 40; /* we'll be skipping BITMAPINFOHEADER */
|
||||
if (size > 1) {
|
||||
gst_codec_utils_h264_caps_set_level_and_profile (stream->caps,
|
||||
avc_data + 8 + 40 + 1, size - 1);
|
||||
|
||||
|
@ -7365,7 +7368,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
|
|||
gst_caps_set_simple (stream->caps,
|
||||
"codec_data", GST_TYPE_BUFFER, buf, NULL);
|
||||
gst_buffer_unref (buf);
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FOURCC_btrt:
|
||||
|
|
Loading…
Reference in a new issue