changeset 29805:b9350576d4fc

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.
author reimar
date Sat, 07 Nov 2009 11:15:26 +0000
parents edecbb61e41f
children a5e7590ffdbd
files libmpdemux/demux_lavf.c
diffstat 1 files changed, 3 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- 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; i<avfc->nb_streams; i++)
         handle_stream(demuxer, avfc, i);
     if(avfc->nb_programs) {
-        int p, start=0, found=0;
-
-        if(ts_prog) {
-            for(p=0; p<avfc->nb_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);