summaryrefslogtreecommitdiff
path: root/libavformat/oggdec.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-08-21 20:39:14 +0200
committerClément Bœsch <ubitux@gmail.com>2012-09-16 16:52:06 +0200
commitedca80387c70d273b2ae8e8a61a83d25378b4e16 (patch)
treed5d7fa6069d91781256aa957c85cf294a5477894 /libavformat/oggdec.c
parent277ddf127dc4c24d7178ff2e9a909e009fe112a4 (diff)
lavf/oggdec: simplify destroying streams with chained audio streams.
nstreams is assumed to be 1 at that point, so the loop is pointless.
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r--libavformat/oggdec.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 9d27393339..05aeddd1b0 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -256,18 +256,15 @@ static int ogg_read_page(AVFormatContext *s, int *sid)
idx = ogg_find_stream (ogg, serial);
if (idx < 0){
if (ogg->headers) {
- int n;
if (ogg->nstreams != 1) {
av_log_missing_feature(s, "Changing stream parameters in multistream ogg is", 0);
return idx;
}
- for (n = 0; n < ogg->nstreams; n++) {
- av_freep(&ogg->streams[n].buf);
- if (!ogg->state || ogg->state->streams[n].private != ogg->streams[n].private)
- av_freep(&ogg->streams[n].private);
- }
+ av_freep(&ogg->streams[0].buf);
+ if (!ogg->state || ogg->state->streams[0].private != ogg->streams[0].private)
+ av_freep(&ogg->streams[0].private);
ogg->curidx = -1;
ogg->nstreams = 0;
idx = ogg_new_stream(s, serial, 0);