mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
avidemux: do not exceed maximum number of supported streams
This commit is contained in:
parent
effa7b4660
commit
5b0f7f04e7
1 changed files with 12 additions and 1 deletions
|
@ -1464,7 +1464,7 @@ too_small:
|
|||
static gboolean
|
||||
gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
|
||||
{
|
||||
avi_stream_context *stream = &avi->stream[avi->num_streams];
|
||||
avi_stream_context *stream;
|
||||
GstElementClass *klass;
|
||||
GstPadTemplate *templ;
|
||||
GstBuffer *sub = NULL;
|
||||
|
@ -1482,6 +1482,17 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
|
|||
|
||||
GST_DEBUG_OBJECT (avi, "Parsing stream");
|
||||
|
||||
if (avi->num_streams >= GST_AVI_DEMUX_MAX_STREAMS) {
|
||||
GST_WARNING_OBJECT (avi,
|
||||
"maximum no of streams (%d) exceeded, ignoring stream",
|
||||
GST_AVI_DEMUX_MAX_STREAMS);
|
||||
gst_buffer_unref (buf);
|
||||
/* not a fatal error, let's say */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
stream = &avi->stream[avi->num_streams];
|
||||
|
||||
/* initial settings */
|
||||
stream->idx_duration = GST_CLOCK_TIME_NONE;
|
||||
stream->hdr_duration = GST_CLOCK_TIME_NONE;
|
||||
|
|
Loading…
Reference in a new issue