summaryrefslogtreecommitdiffstats
path: root/mencoder.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 07:01:31 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:48:38 +0300
commitc0c914effd94324362e4ca70204f1b08783f6121 (patch)
tree5e0c11787d1e44b03dc27c877cd43195c75cf630 /mencoder.c
parentf518cf7ea99e9282508f551ecb43892f6aabcbc4 (diff)
downloadmpv-c0c914effd94324362e4ca70204f1b08783f6121.tar.bz2
mpv-c0c914effd94324362e4ca70204f1b08783f6121.tar.xz
Move audio_id and video_id to options struct
Diffstat (limited to 'mencoder.c')
-rw-r--r--mencoder.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/mencoder.c b/mencoder.c
index d47a1cded2..43784f98d2 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -112,8 +112,6 @@ float stream_cache_seek_min_percent=50.0;
#define cache_fill_status 0
#endif
-int audio_id=-1;
-int video_id=-1;
int dvdsub_id=-2;
int vobsub_id=-1;
char* audio_lang=NULL;
@@ -584,14 +582,14 @@ play_next_file:
#ifdef USE_DVDREAD
if(stream->type==STREAMTYPE_DVD){
- if(audio_lang && audio_id==-1) audio_id=dvd_aid_from_lang(stream,audio_lang);
+ if(audio_lang && opts.audio_id==-1) opts.audio_id=dvd_aid_from_lang(stream,audio_lang);
if(dvdsub_lang && dvdsub_id==-2) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
}
#endif
#ifdef USE_DVDNAV
if(stream->type==STREAMTYPE_DVDNAV){
- if(audio_lang && audio_id==-1) audio_id=dvdnav_aid_from_lang(stream,audio_lang);
+ if(audio_lang && opts.audio_id==-1) opts.audio_id=dvdnav_aid_from_lang(stream,audio_lang);
if(dvdsub_lang && dvdsub_id==-2) dvdsub_id=dvdnav_sid_from_lang(stream,dvdsub_lang);
}
#endif
@@ -600,17 +598,17 @@ if(stream->type==STREAMTYPE_DVDNAV){
if(stream_cache_size>0) stream_enable_cache(stream,stream_cache_size*1024,0,0);
- if(demuxer2) audio_id=-2; /* do NOT read audio packets... */
+ if(demuxer2) opts.audio_id=-2; /* do NOT read audio packets... */
- //demuxer=demux_open(stream,file_format,video_id,audio_id,dvdsub_id);
- demuxer=demux_open(&opts, stream,file_format,audio_id,video_id,dvdsub_id,filename);
+ //demuxer=demux_open(stream,file_format,opts.video_id,opts.audio_id,dvdsub_id);
+ demuxer=demux_open(&opts, stream,file_format,opts.audio_id,opts.video_id,dvdsub_id,filename);
if(!demuxer){
mp_msg(MSGT_DEMUXER, MSGL_FATAL, MSGTR_FormatNotRecognized);
mp_msg(MSGT_DEMUXER, MSGL_FATAL, MSGTR_CannotOpenDemuxer);
mencoder_exit(1,NULL);
}
- select_audio(demuxer, audio_id, audio_lang);
+ select_audio(demuxer, opts.audio_id, audio_lang);
if (dvdsub_id < 0 && dvdsub_lang)
dvdsub_id = demuxer_sub_track_by_lang(demuxer, dvdsub_lang);
@@ -662,7 +660,7 @@ sh_video=d_video->sh;
}
if(sh_audio && out_audio_codec<0){
- if(audio_id==-2)
+ if(opts.audio_id==-2)
mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_DemuxerDoesntSupportNosound);
mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_NoAudioEncoderSelected);
mencoder_exit(1,NULL);