From 1698db0726e4b7c11f4dc47dfc823df5ab1cd80d Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 7 Nov 2009 11:15:26 +0000 Subject: Remove pointless and broken (e.g. does not set aid and vid) -tsprog handling from lavf demuxer, mplayer.c makes sure IDENTIFY_PROGRAM is called with the right arguments, and that code actually works in contrast to the one in demux_open_lavf. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29847 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 11bf988347..5609c2840a 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -50,7 +50,6 @@ static unsigned int opt_probesize = 0; static unsigned int opt_analyzeduration = 0; static char *opt_format; static char *opt_cryptokey; -extern int ts_prog; static char *opt_avopt = NULL; const m_option_t lavfdopts_conf[] = { @@ -493,30 +492,12 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){ for(i=0; inb_streams; i++) handle_stream(demuxer, avfc, i); if(avfc->nb_programs) { - int p, start=0, found=0; - - if(ts_prog) { - for(p=0; pnb_programs; p++) { - if(avfc->programs[p]->id == ts_prog) { - start = p; - found = 1; - break; - } - } - if(!found) { - mp_msg(MSGT_HEADER,MSGL_ERR,"DEMUX_LAVF: program %d doesn't seem to be present\n", ts_prog); - return NULL; - } - } - p = start; - do { + int p; + for (p = 0; p < avfc->nb_programs; p++) { AVProgram *program = avfc->programs[p]; t = av_metadata_get(program->metadata, "title", NULL, 0); mp_msg(MSGT_HEADER,MSGL_INFO,"LAVF: Program %d %s\n", program->id, t ? t->value : ""); - if(!priv->cur_program && (demuxer->video->sh || demuxer->audio->sh)) - priv->cur_program = program->id; - p = (p + 1) % avfc->nb_programs; - } while(p!=start); + } } mp_msg(MSGT_HEADER,MSGL_V,"LAVF: %d audio and %d video streams found\n",priv->audio_streams,priv->video_streams); -- cgit v1.2.3