mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 11:42:04 +00:00
10l, avoid crash on invalid subtitle id
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22333 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f23e43ba3f
commit
4402f7d089
@ -2155,9 +2155,11 @@ if(trak->pos==0 && trak->stream_header_len>0){
|
||||
|
||||
++trak->pos;
|
||||
|
||||
if (demuxer->sub->id >= 0) {
|
||||
int samplenr = 0;
|
||||
trak = NULL;
|
||||
if (demuxer->sub->id >= 0 && demuxer->sub->id < priv->track_db)
|
||||
trak = priv->tracks[demuxer->sub->id];
|
||||
if (trak) {
|
||||
int samplenr = 0;
|
||||
while (samplenr < trak->samples_size) {
|
||||
double subpts = (double)trak->samples[samplenr].pts / (double)trak->timescale;
|
||||
if (subpts >= pts) break;
|
||||
|
Loading…
Reference in New Issue
Block a user