qtdemux: check stream is available in PIFF parser

qtdemux->streams is an array, it will never evaluate to true when comparing
to NULL. Instead we want to check the number of streams to make sure the
stream is available.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
CID 1358389
This commit is contained in:
Luis de Bethencourt 2016-04-12 11:38:51 +01:00
parent 574bf8e02f
commit 1bb9d9c682

View file

@ -2467,7 +2467,7 @@ qtdemux_parse_piff (GstQTDemux * qtdemux, const guint8 * buffer, gint length,
const gchar *system_id; const gchar *system_id;
gboolean uses_sub_sample_encryption = FALSE; gboolean uses_sub_sample_encryption = FALSE;
if (!qtdemux->streams) if (qtdemux->n_streams == 0)
return; return;
stream = qtdemux->streams[0]; stream = qtdemux->streams[0];