Mercurial > mplayer.hg
comparison mplayer.c @ 29688:94f1bca4f4b6
Add a -nosub option that allows disabling auto-selected subtitles as e.g. the
mkv demuxer supports.
author | reimar |
---|---|
date | Mon, 28 Sep 2009 11:32:27 +0000 |
parents | add9ce0b0e55 |
children | b5e23411a51e |
comparison
equal
deleted
inserted
replaced
29687:ce2631b54dec | 29688:94f1bca4f4b6 |
---|---|
251 extern char *sub_demuxer_name; // override sub demuxer | 251 extern char *sub_demuxer_name; // override sub demuxer |
252 | 252 |
253 // streaming: | 253 // streaming: |
254 int audio_id=-1; | 254 int audio_id=-1; |
255 int video_id=-1; | 255 int video_id=-1; |
256 int dvdsub_id=-2; | 256 int dvdsub_id=-1; |
257 int vobsub_id=-1; | 257 int vobsub_id=-1; |
258 char* audio_lang=NULL; | 258 char* audio_lang=NULL; |
259 char* dvdsub_lang=NULL; | 259 char* dvdsub_lang=NULL; |
260 static char* spudec_ifo=NULL; | 260 static char* spudec_ifo=NULL; |
261 char* filename=NULL; //"MI2-Trailer.avi"; | 261 char* filename=NULL; //"MI2-Trailer.avi"; |
3489 // if user asks for a dvd sub id, use that next. | 3489 // if user asks for a dvd sub id, use that next. |
3490 mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id; | 3490 mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id; |
3491 } else if (mpctx->global_sub_indices[SUB_SOURCE_SUBS] >= 0) { | 3491 } else if (mpctx->global_sub_indices[SUB_SOURCE_SUBS] >= 0) { |
3492 // if there are text subs to use, use those. (autosubs come last here) | 3492 // if there are text subs to use, use those. (autosubs come last here) |
3493 mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_SUBS]; | 3493 mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_SUBS]; |
3494 } else if (dvdsub_id < 0 && mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) { | 3494 } else if (dvdsub_id == -1 && mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) { |
3495 // finally select subs by language and container hints | 3495 // finally select subs by language and container hints |
3496 if (dvdsub_id < 0 && dvdsub_lang) | 3496 if (dvdsub_id == -1 && dvdsub_lang) |
3497 dvdsub_id = demuxer_sub_track_by_lang(mpctx->demuxer, dvdsub_lang); | 3497 dvdsub_id = demuxer_sub_track_by_lang(mpctx->demuxer, dvdsub_lang); |
3498 if (dvdsub_id < 0) | 3498 if (dvdsub_id == -1) |
3499 dvdsub_id = demuxer_default_sub_track(mpctx->demuxer); | 3499 dvdsub_id = demuxer_default_sub_track(mpctx->demuxer); |
3500 if (dvdsub_id >= 0) | 3500 if (dvdsub_id >= 0) |
3501 mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id; | 3501 mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id; |
3502 } | 3502 } |
3503 // rather than duplicate code, use the SUB_SELECT handler to init the right one. | 3503 // rather than duplicate code, use the SUB_SELECT handler to init the right one. |