mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
ignore invalid values in the sequence display extension (backport from 0.4.1)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21415 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4d696cc729
commit
c4a33d0dc4
@ -272,9 +272,11 @@ static int sequence_display_ext (mpeg2dec_t * mpeg2dec)
|
||||
if (!(buffer[2] & 2)) /* missing marker_bit */
|
||||
return 1;
|
||||
|
||||
sequence->display_width = (buffer[1] << 6) | (buffer[2] >> 2);
|
||||
sequence->display_height =
|
||||
((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3);
|
||||
if( (buffer[1] << 6) | (buffer[2] >> 2) )
|
||||
sequence->display_width = (buffer[1] << 6) | (buffer[2] >> 2);
|
||||
if( ((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3) )
|
||||
sequence->display_height =
|
||||
((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user