asfdemux: Fix payloads check

Don't iterate stream->payloads if ... it doesn't exist

CID #1139846
This commit is contained in:
Edward Hervey 2014-04-03 15:06:22 +02:00
parent ecf7b967f9
commit fffcbfc127

View file

@ -155,6 +155,7 @@ gst_asf_demux_free_stream (GstASFDemux * demux, AsfStream * stream)
stream->pad = NULL;
}
if (stream->payloads) {
while (stream->payloads->len > 0) {
AsfPayload *payload;
guint last;
@ -164,7 +165,6 @@ gst_asf_demux_free_stream (GstASFDemux * demux, AsfStream * stream)
gst_buffer_replace (&payload->buf, NULL);
g_array_remove_index (stream->payloads, last);
}
if (stream->payloads) {
g_array_free (stream->payloads, TRUE);
stream->payloads = NULL;
}