diff options
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/mpeg_hdr.c | 14 | ||||
-rw-r--r-- | libmpdemux/video.c | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/libmpdemux/mpeg_hdr.c b/libmpdemux/mpeg_hdr.c index d91019ad13..4fb1dc22b0 100644 --- a/libmpdemux/mpeg_hdr.c +++ b/libmpdemux/mpeg_hdr.c @@ -251,14 +251,20 @@ int mp4_header_process_vol(mp_mpeg_header_t * picture, unsigned char * buffer) n++; //marker bit - if(getbits(buffer, n, 1)) { //fixed_vop_timeinc - n++; - n = read_timeinc(picture, buffer, n); + if(getbits(buffer, n++, 1)) { //fixed_vop_timeinc + n += read_timeinc(picture, buffer, n); if(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", // aspect, aspectw, aspecth, picture->timeinc_resolution, picture->timeinc_unit, picture->timeinc_bits, picture->fps); @@ -276,7 +282,7 @@ void mp4_header_process_vop(mp_mpeg_header_t * picture, unsigned char * buffer) n++; getbits(buffer, n, 1); n++; - n = read_timeinc(picture, buffer, n); + n += read_timeinc(picture, buffer, n); } #define min(a, b) ((a) <= (b) ? (a) : (b)) diff --git a/libmpdemux/video.c b/libmpdemux/video.c index 448824aa04..cf0cc9f6a5 100644 --- a/libmpdemux/video.c +++ b/libmpdemux/video.c @@ -168,6 +168,8 @@ switch(video_codec){ 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); |