changeset 29868:7ccde024713a

Add -tsprog support for lavf to mencoder, similar to what SVN r29846 did for mplayer.
author reimar
date Fri, 13 Nov 2009 14:36:38 +0000
parents a8e0b5425393
children c266883dd527
files mencoder.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mencoder.c	Fri Nov 13 14:12:25 2009 +0000
+++ b/mencoder.c	Fri Nov 13 14:36:38 2009 +0000
@@ -552,6 +552,14 @@
 	mencoder_exit(1,NULL);
   }
 
+  if (ts_prog) {
+    demux_program_t prog = { .progid = ts_prog };
+    if (demux_control(demuxer, DEMUXER_CTRL_IDENTIFY_PROGRAM, &prog) != DEMUXER_CTRL_NOTIMPL) {
+      audio_id = prog.aid; // switching is handled by select_audio below
+      video_id = prog.vid;
+      demuxer_switch_video(demuxer, video_id);
+    }
+  }
   select_audio(demuxer, audio_id, audio_lang);
 
   if (dvdsub_id == -1 && dvdsub_lang)