diff options
Diffstat (limited to 'mencoder.c')
-rw-r--r-- | mencoder.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/mencoder.c b/mencoder.c index d1472a0568..7f4094f663 100644 --- a/mencoder.c +++ b/mencoder.c @@ -221,6 +221,12 @@ void mplayer_put_key(struct mp_fifo *fifo, int code) char *current_module; #include "mpcommon.h" +// Needed by mpcommon.c +void set_osd_subtitle(struct MPContext *mpctx, subtitle *subs) { + vo_sub = subs; + vo_osd_changed(OSDTYPE_SUBTITLE); +} + //char *out_audio_codec=NULL; // override audio codec //char *out_video_codec=NULL; // override video codec @@ -526,14 +532,14 @@ play_next_file: #ifdef CONFIG_DVDREAD if(stream->type==STREAMTYPE_DVD){ if(audio_lang && opts.audio_id==-1) opts.audio_id=dvd_aid_from_lang(stream,audio_lang); - if(dvdsub_lang && opts.sub_id==-2) opts.sub_id=dvd_sid_from_lang(stream,dvdsub_lang); + if(dvdsub_lang && opts.sub_id==-1) opts.sub_id=dvd_sid_from_lang(stream,dvdsub_lang); } #endif #ifdef CONFIG_DVDNAV if(stream->type==STREAMTYPE_DVDNAV){ if(audio_lang && opts.audio_id==-1) opts.audio_id=mp_dvdnav_aid_from_lang(stream,audio_lang); - if(dvdsub_lang && opts.sub_id==-2) opts.sub_id=mp_dvdnav_sid_from_lang(stream,dvdsub_lang); + if(dvdsub_lang && opts.sub_id==-1) opts.sub_id=mp_dvdnav_sid_from_lang(stream,dvdsub_lang); } #endif @@ -553,10 +559,10 @@ if(stream->type==STREAMTYPE_DVDNAV){ select_audio(demuxer, opts.audio_id, audio_lang); - if (opts.sub_id < 0 && dvdsub_lang) + if (opts.sub_id < -1 && dvdsub_lang) opts.sub_id = demuxer_sub_track_by_lang(demuxer, dvdsub_lang); - if (opts.sub_id < 0) + if (opts.sub_id < -1) opts.sub_id = demuxer_default_sub_track(demuxer); for (i = 0; i < MAX_S_STREAMS; i++) { @@ -1470,7 +1476,7 @@ if(sh_audio && !demuxer2){ } else #endif - update_subtitles(sh_video, d_dvdsub, 0, 0); + update_subtitles(NULL, &opts, sh_video, sh_video->pts, 0, d_dvdsub, 0); frame_data = (s_frame_data){ .start = NULL, .in_size = 0, .frame_time = 0., .already_read = 0 }; |