From 50a86fcc343f1026ee8cab0d9788c6bee35e720b Mon Sep 17 00:00:00 2001 From: mosu Date: Thu, 25 Nov 2004 22:24:00 +0000 Subject: Output more information about vids, aids, sids, alangs and slangs with -identify. Patch by kiriuja git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14047 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demuxer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libmpdemux/demuxer.c') diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c index 43484d1086..167ef18e6e 100644 --- a/libmpdemux/demuxer.c +++ b/libmpdemux/demuxer.c @@ -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_audio_t* new_sh_audio(demuxer_t *demuxer,int id){ 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 @@ sh_video_t* new_sh_video(demuxer_t *demuxer,int id){ 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* demux_open(stream_t *vs,int file_format,int audio_id,int video_id,int 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) { -- cgit v1.2.3