From 25ed7ff0c8eeda15b7239d8c596bbe82f1d62bf7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Nov 2017 03:26:40 +0100 Subject: demux: get rid of weird backwards loop A typical idiom for calling functions that remove something from the array being iterated, but it's not needed here. I have no idea why this was ever done. --- demux/demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux') diff --git a/demux/demux.c b/demux/demux.c index 2e4d63bce5..af8ff94611 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -725,7 +725,7 @@ void free_demuxer(demuxer_t *demuxer) demux_flush(demuxer); assert(in->total_bytes == 0); - for (int n = in->num_streams - 1; n >= 0; n--) + for (int n = 0; n < in->num_streams; n++) talloc_free(in->streams[n]); pthread_mutex_destroy(&in->lock); pthread_cond_destroy(&in->wakeup); -- cgit v1.2.3