aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ogg2.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2007-01-15 22:05:22 +0000
committerMåns Rullgård <mans@mansr.com>2007-01-15 22:05:22 +0000
commit20be72c8909cf22811926a6c182a58bc210e47dc (patch)
treeaf487db02b68e205205604dcd79907a39916e0a5 /libavformat/ogg2.c
parent1aa72a703c92a494d1abef27deaa15ae623e7818 (diff)
downloadffmpeg-20be72c8909cf22811926a6c182a58bc210e47dc.tar.gz
save/restore number of streams
Originally committed as revision 7535 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ogg2.c')
-rw-r--r--libavformat/ogg2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/ogg2.c b/libavformat/ogg2.c
index 1e5d386205..d630d4a3da 100644
--- a/libavformat/ogg2.c
+++ b/libavformat/ogg2.c
@@ -90,6 +90,7 @@ ogg_save (AVFormatContext * s)
ost->pos = url_ftell (&s->pb);;
ost->curidx = ogg->curidx;
ost->next = ogg->state;
+ ost->nstreams = ogg->nstreams;
memcpy(ost->streams, ogg->streams, ogg->nstreams * sizeof(*ogg->streams));
for (i = 0; i < ogg->nstreams; i++){
@@ -123,8 +124,9 @@ ogg_restore (AVFormatContext * s, int discard)
url_fseek (bc, ost->pos, SEEK_SET);
ogg->curidx = ost->curidx;
- memcpy (ogg->streams, ost->streams,
- ogg->nstreams * sizeof (*ogg->streams));
+ ogg->nstreams = ost->nstreams;
+ memcpy(ogg->streams, ost->streams,
+ ost->nstreams * sizeof(*ogg->streams));
}
av_free (ost);