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
This commit is contained in:
cehoyos 2010-03-15 22:32:11 +00:00
parent 0eee2d2bd5
commit 6c239f12ff
2 changed files with 9 additions and 0 deletions

View File

@ -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; 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", //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); // aspect, aspectw, aspecth, picture->timeinc_resolution, picture->timeinc_unit, picture->timeinc_bits, picture->fps);

View File

@ -169,6 +169,8 @@ switch(video_codec){
return 0; return 0;
} }
mp4_header_process_vop(&picture, &(videobuffer[pos])); 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; units[vop_cnt] = picture.timeinc_unit;
vop_cnt++; vop_cnt++;
//mp_msg(MSGT_DECVIDEO,MSGL_V, "TYPE: %d, unit: %d\n", picture.picture_type, picture.timeinc_unit); //mp_msg(MSGT_DECVIDEO,MSGL_V, "TYPE: %d, unit: %d\n", picture.picture_type, picture.timeinc_unit);