summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-11-10 03:26:40 +0100
committerwm4 <wm4@nowhere>2017-11-10 03:26:40 +0100
commit25ed7ff0c8eeda15b7239d8c596bbe82f1d62bf7 (patch)
tree834fedf4b88fbb0cfbfbb7e611701c9e0c5dabc6 /demux
parent9c330b53e375d1a1886be5b7fd3e0e22331b3384 (diff)
downloadmpv-25ed7ff0c8eeda15b7239d8c596bbe82f1d62bf7.tar.bz2
mpv-25ed7ff0c8eeda15b7239d8c596bbe82f1d62bf7.tar.xz
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.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c2
1 files changed, 1 insertions, 1 deletions
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);