summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-07-02 20:43:07 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-07-02 20:43:07 +0000
commit3d723aa626227a60554b17410bd8096a7886d934 (patch)
tree8eae542d39f03cea36b3345d355e746ff7976cc7 /libmpdemux
parente405703e68922f8924bfa144953832bb89d10845 (diff)
downloadmpv-3d723aa626227a60554b17410bd8096a7886d934.tar.bz2
mpv-3d723aa626227a60554b17410bd8096a7886d934.tar.xz
A little hack to be able to play ogg radio stream
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10364 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_ogg.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c
index 75a153dc1f..d1289b3f49 100644
--- a/libmpdemux/demux_ogg.c
+++ b/libmpdemux/demux_ogg.c
@@ -287,8 +287,18 @@ static int demux_ogg_get_page_stream(ogg_demuxer_t* ogg_d,ogg_stream_state** os
break;
}
- if(id == ogg_d->num_sub)
- return -1;
+ if(id == ogg_d->num_sub) {
+ // If we have only one vorbis stream allow the stream id to change
+ // it's normal on radio stream (each song have an different id).
+ // But we (or the codec?) should check that the samplerate, etc
+ // doesn't change (for radio stream it's ok)
+ if(ogg_d->num_sub == 1 && ogg_d->subs[0].vorbis) {
+ ogg_stream_reset(&ogg_d->subs[0].stream);
+ ogg_stream_init(&ogg_d->subs[0].stream,s_no);
+ id = 0;
+ } else
+ return -1;
+ }
if(os)
*os = &ogg_d->subs[id].stream;