[Ffmpeg-cvslog] r7535 - in trunk/libavformat: ogg2.c ogg2.h
mru
subversion
Mon Jan 15 23:05:22 CET 2007
Author: mru
Date: Mon Jan 15 23:05:22 2007
New Revision: 7535
Modified:
trunk/libavformat/ogg2.c
trunk/libavformat/ogg2.h
Log:
save/restore number of streams
Modified: trunk/libavformat/ogg2.c
==============================================================================
--- trunk/libavformat/ogg2.c (original)
+++ trunk/libavformat/ogg2.c Mon Jan 15 23:05:22 2007
@@ -90,6 +90,7 @@
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 @@
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);
Modified: trunk/libavformat/ogg2.h
==============================================================================
--- trunk/libavformat/ogg2.h (original)
+++ trunk/libavformat/ogg2.h Mon Jan 15 23:05:22 2007
@@ -57,6 +57,7 @@
uint64_t pos;
int curidx;
struct ogg_state *next;
+ int nstreams;
ogg_stream_t streams[1];
} ogg_state_t;
More information about the ffmpeg-cvslog
mailing list