mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
asfdemux: Fix payloads check
Don't iterate stream->payloads if ... it doesn't exist CID #1139846
This commit is contained in:
parent
ecf7b967f9
commit
fffcbfc127
1 changed files with 9 additions and 9 deletions
|
@ -155,16 +155,16 @@ gst_asf_demux_free_stream (GstASFDemux * demux, AsfStream * stream)
|
|||
stream->pad = NULL;
|
||||
}
|
||||
|
||||
while (stream->payloads->len > 0) {
|
||||
AsfPayload *payload;
|
||||
guint last;
|
||||
|
||||
last = stream->payloads->len - 1;
|
||||
payload = &g_array_index (stream->payloads, AsfPayload, last);
|
||||
gst_buffer_replace (&payload->buf, NULL);
|
||||
g_array_remove_index (stream->payloads, last);
|
||||
}
|
||||
if (stream->payloads) {
|
||||
while (stream->payloads->len > 0) {
|
||||
AsfPayload *payload;
|
||||
guint last;
|
||||
|
||||
last = stream->payloads->len - 1;
|
||||
payload = &g_array_index (stream->payloads, AsfPayload, last);
|
||||
gst_buffer_replace (&payload->buf, NULL);
|
||||
g_array_remove_index (stream->payloads, last);
|
||||
}
|
||||
g_array_free (stream->payloads, TRUE);
|
||||
stream->payloads = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue