diff libmpdemux/demuxer.c @ 14046:4802041ab8e3

Output more information about vids, aids, sids, alangs and slangs with -identify. Patch by kiriuja <mplayer-patches@en-directo.net>
author mosu
date Thu, 25 Nov 2004 22:24:00 +0000
parents 7ac60a1c576e
children 467dae0f6c68
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Thu Nov 25 21:47:58 2004 +0000
+++ b/libmpdemux/demuxer.c	Thu Nov 25 22:24:00 2004 +0000
@@ -21,6 +21,10 @@
 #include "../libao2/afmt.h"
 #include "../libvo/fastmemcpy.h"
 
+// Should be set to 1 by demux module if ids it passes to new_sh_audio and
+// new_sh_video don't match aids and vids it accepts from the command line
+int demux_aid_vid_mismatch = 0;
+
 void free_demuxer_stream(demux_stream_t *ds){
     ds_free_packs(ds);
     free(ds);
@@ -89,6 +93,8 @@
         sh->samplesize=2;
         sh->sample_format=AFMT_S16_NE;
         sh->audio_out_minsize=8192;/* default size, maybe not enough for Win32/ACM*/
+        if (identify && !demux_aid_vid_mismatch)
+          mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_AUDIO_ID=%d\n", id);
     }
     return demuxer->a_streams[id];
 }
@@ -112,6 +118,8 @@
         mp_msg(MSGT_DEMUXER,MSGL_V,MSGTR_FoundVideoStream,id);
         demuxer->v_streams[id]=malloc(sizeof(sh_video_t));
         memset(demuxer->v_streams[id],0,sizeof(sh_video_t));
+        if (identify && !demux_aid_vid_mismatch)
+          mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_VIDEO_ID=%d\n", id);
     }
     return demuxer->v_streams[id];
 }
@@ -1404,6 +1412,8 @@
   demuxer_t *vd,*ad = NULL,*sd = NULL;
   int afmt =DEMUXER_TYPE_UNKNOWN,sfmt = DEMUXER_TYPE_UNKNOWN ;
 
+  demux_aid_vid_mismatch = 0;
+
   if(audio_stream) {
     as = open_stream(audio_stream,0,&afmt);
     if(!as) {