summaryrefslogtreecommitdiffstats
path: root/libmpdemux/mpeg_hdr.c
diff options
context:
space:
mode:
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-15 22:32:11 +0000
committercehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-15 22:32:11 +0000
commit6c239f12ff690018ab7eadfcebd9d11000107024 (patch)
treee1fa82514ca31eec934e2c3e0510c127374fda57 /libmpdemux/mpeg_hdr.c
parent0eee2d2bd5a9aa03ff9211ef481914041e4ec644 (diff)
downloadmpv-6c239f12ff690018ab7eadfcebd9d11000107024.tar.bz2
mpv-6c239f12ff690018ab7eadfcebd9d11000107024.tar.xz
Calculate width and height in mp4_header_process_vop().
Fixes elementary streams with -vc ffodivxvdpau and the native demuxer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30904 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/mpeg_hdr.c')
-rw-r--r--libmpdemux/mpeg_hdr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libmpdemux/mpeg_hdr.c b/libmpdemux/mpeg_hdr.c
index 1ce9d28441..4fb1dc22b0 100644
--- a/libmpdemux/mpeg_hdr.c
+++ b/libmpdemux/mpeg_hdr.c
@@ -258,6 +258,13 @@ int mp4_header_process_vol(mp_mpeg_header_t * picture, unsigned char * buffer)
picture->fps = (float) picture->timeinc_resolution / (float) picture->timeinc_unit;
}
+ n++; //marker bit
+ picture->display_picture_width = getbits16(buffer, n, 13);
+ n += 13;
+ n++; //marker bit
+ picture->display_picture_height = getbits16(buffer, n, 13);
+ n += 13;
+
//fprintf(stderr, "ASPECT: %d, PARW=%d, PARH=%d, TIMEINCRESOLUTION: %d, FIXED_TIMEINC: %d (number of bits: %d), FPS: %u\n",
// aspect, aspectw, aspecth, picture->timeinc_resolution, picture->timeinc_unit, picture->timeinc_bits, picture->fps);