# HG changeset patch # User cehoyos # Date 1268692331 0 # Node ID 2a8e5cea0c8cfe2ef9ecf5e6ce62d9159c6e251e # Parent 1f3b39209b2d5b7b6a812d87992bc03490842d85 Calculate width and height in mp4_header_process_vop(). Fixes elementary streams with -vc ffodivxvdpau and the native demuxer. diff -r 1f3b39209b2d -r 2a8e5cea0c8c libmpdemux/mpeg_hdr.c --- a/libmpdemux/mpeg_hdr.c Mon Mar 15 22:28:08 2010 +0000 +++ b/libmpdemux/mpeg_hdr.c Mon Mar 15 22:32:11 2010 +0000 @@ -258,6 +258,13 @@ 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); diff -r 1f3b39209b2d -r 2a8e5cea0c8c libmpdemux/video.c --- a/libmpdemux/video.c Mon Mar 15 22:28:08 2010 +0000 +++ b/libmpdemux/video.c Mon Mar 15 22:32:11 2010 +0000 @@ -169,6 +169,8 @@ return 0; } mp4_header_process_vop(&picture, &(videobuffer[pos])); + sh_video->disp_w = picture.display_picture_width; + sh_video->disp_h = picture.display_picture_height; units[vop_cnt] = picture.timeinc_unit; vop_cnt++; //mp_msg(MSGT_DECVIDEO,MSGL_V, "TYPE: %d, unit: %d\n", picture.picture_type, picture.timeinc_unit);