mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
matroskademux: don't crash if vorbis/theora codec data is missing
Error out properly in this case instead of crashing. https://bugzilla.gnome.org/show_bug.cgi?id=632682
This commit is contained in:
parent
631e2aa043
commit
6cf398cdf3
1 changed files with 6 additions and 0 deletions
|
@ -4263,6 +4263,12 @@ gst_matroska_demux_push_xiph_codec_priv_data (GstMatroskaDemux * demux,
|
|||
gint i, offset, num_packets;
|
||||
guint *length, last;
|
||||
|
||||
if (stream->codec_priv == NULL || stream->codec_priv_size == 0) {
|
||||
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL),
|
||||
("Missing codec private data for xiph headers, broken file"));
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
/* start of the stream and vorbis audio or theora video, need to
|
||||
* send the codec_priv data as first three packets */
|
||||
num_packets = p[0] + 1;
|
||||
|
|
Loading…
Reference in a new issue