diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 01:18:24 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 01:18:24 +0200 |
commit | fb09531720a4aa2dfa97e5a9a246a453b6278fd2 (patch) | |
tree | 61525c3a8ddb419d3838a26e488fc3659079bbcd /contrib/ffmpeg/libavformat/ogg2.c | |
parent | 294d01046724e28b7193bcb65bf2a0391b0135b6 (diff) | |
download | xine-lib-fb09531720a4aa2dfa97e5a9a246a453b6278fd2.tar.gz xine-lib-fb09531720a4aa2dfa97e5a9a246a453b6278fd2.tar.bz2 |
Sync with a more recent version of FFmpeg.
Diffstat (limited to 'contrib/ffmpeg/libavformat/ogg2.c')
-rw-r--r-- | contrib/ffmpeg/libavformat/ogg2.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/ffmpeg/libavformat/ogg2.c b/contrib/ffmpeg/libavformat/ogg2.c index 1e5d38620..8ca7b2d13 100644 --- a/contrib/ffmpeg/libavformat/ogg2.c +++ b/contrib/ffmpeg/libavformat/ogg2.c @@ -67,8 +67,8 @@ ogg_write_trailer (AVFormatContext * avfcontext) AVOutputFormat ogg_muxer = { "ogg", - "Ogg Vorbis", - "audio/x-vorbis", + "Ogg format", + "application/ogg", "ogg", sizeof (OggContext), CODEC_ID_VORBIS, @@ -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); @@ -482,7 +484,8 @@ ogg_get_length (AVFormatContext * s) url_fseek (&s->pb, end, SEEK_SET); while (!ogg_read_page (s, &i)){ - if (ogg->streams[i].granule != -1 && ogg->streams[i].granule != 0) + if (ogg->streams[i].granule != -1 && ogg->streams[i].granule != 0 && + ogg->streams[i].codec) idx = i; } |