qtdemux: turn impossible condition into an assert

qtdemux_update_streams() is only ever called after checking
`qtdemux->streams_aware` is TRUE. There is no need to check for that
condition again.

`qtdemux->streams_aware` is only modified when the demuxer is
hard-resetted, which is mutually exclusive with demuxing, so it cannot
be modified during the call.

https://bugzilla.gnome.org/show_bug.cgi?id=797191
This commit is contained in:
Alicia Boya García 2018-09-22 17:22:46 +02:00 committed by Tim-Philipp Müller
parent 7ceefec714
commit bc0ea0dbbb

View file

@ -12425,6 +12425,7 @@ static gboolean
qtdemux_update_streams (GstQTDemux * qtdemux)
{
GList *iter, *next;
g_assert (qtdemux->streams_aware);
/* At below, figure out which stream in active_streams has identical stream-id
* with that of in old_streams. If there is matching stream-id,
@ -12449,8 +12450,7 @@ qtdemux_update_streams (GstQTDemux * qtdemux)
qtdemux->n_streams++;
if (qtdemux->streams_aware
&& (tmp = _stream_in_list (qtdemux->old_streams, stream)) != NULL
if ((tmp = _stream_in_list (qtdemux->old_streams, stream)) != NULL
&& QTDEMUX_STREAM (tmp->data)->pad) {
QtDemuxStream *oldstream = QTDEMUX_STREAM (tmp->data);