changeset 5897:5f25f1f06c95

Add support for another AVI with ogg/vorbis audio (0x674F)
author albeu
date Mon, 29 Apr 2002 13:36:18 +0000
parents 242e10c13f89
children 31202ff6fb3d
files libmpdemux/demuxer.c
diffstat 1 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Mon Apr 29 13:31:17 2002 +0000
+++ b/libmpdemux/demuxer.c	Mon Apr 29 13:36:18 2002 +0000
@@ -800,8 +800,22 @@
    demuxer = (demuxer_t*) demux_open_avi(demuxer);
    if(!demuxer) return NULL; // failed to open
    sh_a = (sh_audio_t*)demuxer->audio->sh;
-   if(demuxer->audio->id != -2 && sh_a && sh_a->format == 0xFFFE)
-     demuxer = init_avi_with_ogg(demuxer);
+   if(demuxer->audio->id != -2 && sh_a) {
+     if(sh_a->format == 0xFFFE)
+       demuxer = init_avi_with_ogg(demuxer);
+     else if(sh_a->format == 0x674F) {
+       stream_t* s;
+       demuxer_t  *od;
+       s = new_ds_stream(demuxer->audio);
+       od = new_demuxer(s,DEMUXER_TYPE_OGG,-1,-2,-2);
+       if(!demux_ogg_open(od)) {
+	 mp_msg( MSGT_DEMUXER,MSGL_ERR,"Unable to open the ogg demuxer\n");
+	 free_stream(s);
+	 demuxer->audio->id = -2;
+       } else
+	 demuxer = new_demuxers_demuxer(demuxer,od,demuxer);
+     }
+   }       
    return demuxer;
 //  break;
  }