# HG changeset patch # User reimar # Date 1257592526 0 # Node ID b9350576d4fcc6833bcd03b9f0bad5c8850777e6 # Parent edecbb61e41f8f093b5d0c0a56ef16a97996c4e9 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. diff -r edecbb61e41f -r b9350576d4fc libmpdemux/demux_lavf.c --- a/libmpdemux/demux_lavf.c Sat Nov 07 11:12:56 2009 +0000 +++ b/libmpdemux/demux_lavf.c Sat Nov 07 11:15:26 2009 +0000 @@ -50,7 +50,6 @@ 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 @@ 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);