summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_ogg.c
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2003-02-02 17:36:06 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2003-02-02 17:36:06 +0000
commitd24ab1a374a87333510c89ed692f9336433ec918 (patch)
tree065dd36be3cdad9d93ac096495c657606c4ad469 /src/demuxers/demux_ogg.c
parentfd3ac34684e6471972a9d9e8eea20370cc63cb92 (diff)
downloadxine-lib-d24ab1a374a87333510c89ed692f9336433ec918.tar.gz
xine-lib-d24ab1a374a87333510c89ed692f9336433ec918.tar.bz2
copyright updates and some code to catch late-starting ogg streams
CVS patchset: 4093 CVS date: 2003/02/02 17:36:06
Diffstat (limited to 'src/demuxers/demux_ogg.c')
-rw-r--r--src/demuxers/demux_ogg.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index 043c6b714..d40e42f7c 100644
--- a/src/demuxers/demux_ogg.c
+++ b/src/demuxers/demux_ogg.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_ogg.c,v 1.65 2003/02/01 18:57:33 guenter Exp $
+ * $Id: demux_ogg.c,v 1.66 2003/02/02 17:36:06 guenter Exp $
*
* demultiplexer for ogg streams
*
@@ -757,7 +757,7 @@ static void demux_ogg_send_content (demux_ogg_t *this) {
/* now we've got at least one new page */
cur_serno = ogg_page_serialno (&this->og);
-
+
for (i = 0; i<this->num_streams; i++) {
if (this->oss[i].serialno == cur_serno) {
stream_num = i;
@@ -767,7 +767,18 @@ static void demux_ogg_send_content (demux_ogg_t *this) {
if (stream_num < 0) {
printf ("demux_ogg: error: unknown stream, serialnumber %d\n", cur_serno);
- return;
+
+ if (!ogg_page_bos(&this->og)) {
+ printf ("demux_ogg: help, stream with no beginning!\n");
+ }
+
+ printf ("demux_ogg: adding late stream with serial number %d (all content will be discarded)\n",
+ cur_serno);
+
+ ogg_stream_init(&this->oss[this->num_streams], cur_serno);
+ stream_num = this->num_streams;
+ this->buf_types[stream_num] = 0;
+ this->num_streams++;
}
ogg_stream_pagein(&this->oss[stream_num], &this->og);