mirror of
https://github.com/mpv-player/mpv
synced 2025-02-07 15:41:55 +00:00
don't reset dvdsub->id unless -slang is specified; assign default sub stream id when demux->sub->id is -1 (autodetect)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17287 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6193679753
commit
db69d933c1
@ -36,6 +36,7 @@ typedef struct mpg_demuxer {
|
||||
int a_stream_ids[MAX_A_STREAMS];
|
||||
} mpg_demuxer_t;
|
||||
|
||||
extern char* dvdsub_lang;
|
||||
static int mpeg_pts_error=0;
|
||||
|
||||
static int parse_psm(demuxer_t *demux, int len) {
|
||||
@ -293,6 +294,10 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
|
||||
demux->s_streams[aid]=1;
|
||||
}
|
||||
|
||||
if(demux->sub->id > -1)
|
||||
demux->sub->id &= 0x1F;
|
||||
if(!dvdsub_lang && demux->sub->id == -1)
|
||||
demux->sub->id = aid;
|
||||
if(demux->sub->id==aid){
|
||||
ds=demux->sub;
|
||||
}
|
||||
|
@ -3794,8 +3794,10 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
|
||||
vo_sub_last = vo_sub = NULL;
|
||||
#endif
|
||||
vobsub_id = -1;
|
||||
if(dvdsub_lang) {
|
||||
dvdsub_id = -1;
|
||||
if (d_dvdsub) d_dvdsub->id = -1;
|
||||
}
|
||||
|
||||
// be careful!
|
||||
// if sub_changed is till on but subdata's been reset, bad things happen.
|
||||
|
Loading…
Reference in New Issue
Block a user