mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 21:27:08 +00:00
Support software scaling with DVD subtitles
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4088 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6b7e857c4f
commit
610d48a930
@ -275,7 +275,7 @@ inline static void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,in
|
||||
void *vo_spudec=NULL;
|
||||
void *vo_vobsub=NULL;
|
||||
inline static void vo_draw_spudec(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){
|
||||
spudec_draw(vo_spudec, draw_alpha);
|
||||
spudec_draw_scaled(vo_spudec, dxs, dys, draw_alpha);
|
||||
}
|
||||
inline static void vo_draw_vobsub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){
|
||||
vobsub_draw(vo_vobsub, dxs, dys, draw_alpha);
|
||||
|
24
mplayer.c
24
mplayer.c
@ -900,18 +900,6 @@ if(stream_dump_type==5){
|
||||
exit_player(MSGTR_Exit_eof);
|
||||
}
|
||||
|
||||
#ifdef USE_DVDREAD
|
||||
current_module="dvd lang->id";
|
||||
if(audio_lang && audio_id==-1) audio_id=dvd_aid_from_lang(stream,audio_lang);
|
||||
if(dvdsub_lang && dvdsub_id==-1) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
|
||||
|
||||
current_module="spudec";
|
||||
vo_spudec=spudec_new(stream->priv?((dvd_priv_t *)(stream->priv))->cur_pgc->palette:NULL);
|
||||
if (vo_spudec!=NULL)
|
||||
inited_flags|=INITED_SPUDEC;
|
||||
#endif
|
||||
current_module=NULL;
|
||||
|
||||
// initial prefill: 20% later: 5% (should be set by -cacheopts)
|
||||
if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024/5,stream_cache_size*1024/20);
|
||||
|
||||
@ -1038,6 +1026,18 @@ if(!sh_video){
|
||||
goto goto_next_file; // exit_player(MSGTR_Exit_error);
|
||||
}
|
||||
|
||||
#ifdef USE_DVDREAD
|
||||
current_module="dvd lang->id";
|
||||
if(audio_lang && audio_id==-1) audio_id=dvd_aid_from_lang(stream,audio_lang);
|
||||
if(dvdsub_lang && dvdsub_id==-1) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
|
||||
|
||||
current_module="spudec";
|
||||
vo_spudec=spudec_new_scaled(stream->priv?((dvd_priv_t *)(stream->priv))->cur_pgc->palette:NULL,
|
||||
sh_video->disp_w, sh_video->disp_h);
|
||||
if (vo_spudec!=NULL)
|
||||
inited_flags|=INITED_SPUDEC;
|
||||
#endif
|
||||
current_module=NULL;
|
||||
|
||||
#ifdef USE_SUB
|
||||
// after reading video params we should load subtitles because
|
||||
|
Loading…
Reference in New Issue
Block a user