1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-30 11:02:10 +00:00

width and height in seq_header could never be 0

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12618 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
iive 2004-06-21 16:03:55 +00:00
parent 87db316b13
commit 2576078e08

View File

@ -111,6 +111,10 @@ int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec)
i = (buffer[0] << 16) | (buffer[1] << 8) | buffer[2];
sequence->display_width = sequence->picture_width = width = i >> 12;
sequence->display_height = sequence->picture_height = height = i & 0xfff;
if(width == 0 || height == 0)
return 1;
decoder->width = sequence->width = width = (width + 15) & ~15;
decoder->height = sequence->height = height = (height + 15) & ~15;
decoder->vertical_position_extension = (height > 2800);