diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 16:57:25 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 16:57:25 +0300 |
commit | ff559b8e90c343eb465400d77fe8881eff09c6e3 (patch) | |
tree | f97a23e6945e91be5be86baf2cfc06e0d384e867 /libmpdemux | |
parent | d2e25a90c40c47b97becaa6eaefa16e61f7f0cdf (diff) | |
parent | b864ff1b8d73616e2e5bab1e00ef2bdb8fe50278 (diff) | |
download | mpv-ff559b8e90c343eb465400d77fe8881eff09c6e3.tar.bz2 mpv-ff559b8e90c343eb465400d77fe8881eff09c6e3.tar.xz |
Merge svn changes up to r30907
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); |