dashdemux: Fix potential NULL pointer dereference

CID 1399700
This commit is contained in:
Sebastian Dröge 2017-02-28 15:53:10 +02:00
parent 95b85eae5a
commit ef70cd48c6

View file

@ -1176,8 +1176,13 @@ gst_dash_demux_stream_update_fragment_info (GstAdaptiveDemuxStream * stream)
}
}
g_free (dashstream->last_representation_id);
dashstream->last_representation_id =
g_strdup (dashstream->active_stream->cur_representation->id);
if (dashstream->active_stream
&& dashstream->active_stream->cur_representation) {
dashstream->last_representation_id =
g_strdup (dashstream->active_stream->cur_representation->id);
} else {
dashstream->last_representation_id = NULL;
}
}
if (GST_ADAPTIVE_DEMUX_STREAM_NEED_HEADER (stream)) {