diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-01-02 20:40:25 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-01-02 20:40:25 +0000 |
commit | db69d933c116f80c3e02f1cbc0e2df28bf993d56 (patch) | |
tree | 19690fcfc52ce6713f2b8ecdf76e2ab8bef933f9 /libmpdemux | |
parent | 6193679753e42999894580efe1f8b95bd0f8b304 (diff) | |
download | mpv-db69d933c116f80c3e02f1cbc0e2df28bf993d56.tar.bz2 mpv-db69d933c116f80c3e02f1cbc0e2df28bf993d56.tar.xz |
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
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_mpg.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c index 4f57c89a3d..a3ae67506f 100644 --- a/libmpdemux/demux_mpg.c +++ b/libmpdemux/demux_mpg.c @@ -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; } |