mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
flvdemux: Ignore invalid H.264 codec data
This code basically skip over codec_data with empty payload. In this case, the codec_data variable is the size of the header for the CODEC part of Video Tag. The remaining is supposed to be the H.264 codec data, hence should not be empty. https://bugzilla.gnome.org/show_bug.cgi?id=787795
This commit is contained in:
parent
18dbd49fb8
commit
cfc1638ca5
1 changed files with 5 additions and 0 deletions
|
@ -1520,6 +1520,11 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer)
|
|||
switch (avc_packet_type) {
|
||||
case 0:
|
||||
{
|
||||
if (demux->tag_data_size < codec_data) {
|
||||
GST_ERROR_OBJECT (demux, "Got invalid H.264 codec, ignoring.");
|
||||
break;
|
||||
}
|
||||
|
||||
/* AVCDecoderConfigurationRecord data */
|
||||
GST_LOG_OBJECT (demux, "got an H.264 codec data packet");
|
||||
if (demux->video_codec_data) {
|
||||
|
|
Loading…
Reference in a new issue