Commit 5b24b0b6 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: use define for block size

parent 2f0a363d
......@@ -838,8 +838,8 @@ static int MP4_ReadBox_tkhd( stream_t *p_stream, MP4_Box_t *p_box )
scale[1],
translate[0],
translate[1],
(float)p_box->data.p_tkhd->i_width / 65536,
(float)p_box->data.p_tkhd->i_height / 65536,
(float)p_box->data.p_tkhd->i_width / BLOCK16x16,
(float)p_box->data.p_tkhd->i_height / BLOCK16x16,
p_box->data.p_tkhd->i_matrix[0],
p_box->data.p_tkhd->i_matrix[1],
p_box->data.p_tkhd->i_matrix[2],
......@@ -1665,8 +1665,8 @@ static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
memcpy( &f_sample_rate, &dummy, 8 );
msg_Dbg( p_stream, "read box: %f Hz", f_sample_rate );
p_box->data.p_sample_soun->i_sampleratehi = (int)f_sample_rate % 65536;
p_box->data.p_sample_soun->i_sampleratelo = f_sample_rate / 65536;
p_box->data.p_sample_soun->i_sampleratehi = (int)f_sample_rate % BLOCK16x16;
p_box->data.p_sample_soun->i_sampleratelo = f_sample_rate / BLOCK16x16;
MP4_GET4BYTES( i_channel );
p_box->data.p_sample_soun->i_channelcount = i_channel;
......@@ -1712,7 +1712,7 @@ static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
p_box->data.p_sample_soun->i_channelcount,
p_box->data.p_sample_soun->i_samplesize,
(float)p_box->data.p_sample_soun->i_sampleratehi +
(float)p_box->data.p_sample_soun->i_sampleratelo / 65536 );
(float)p_box->data.p_sample_soun->i_sampleratelo / BLOCK16x16 );
#endif
MP4_READBOX_EXIT( 1 );
......
......@@ -25,6 +25,8 @@
#include <vlc_es.h>
#define BLOCK16x16 (1<<16)
#define ATOM_root VLC_FOURCC( 'r', 'o', 'o', 't' )
#define ATOM_uuid VLC_FOURCC( 'u', 'u', 'i', 'd' )
......
......@@ -2607,8 +2607,8 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
p_track->i_track_ID = p_tkhd->data.p_tkhd->i_track_ID;
p_track->i_width = p_tkhd->data.p_tkhd->i_width / 65536;
p_track->i_height = p_tkhd->data.p_tkhd->i_height / 65536;
p_track->i_width = p_tkhd->data.p_tkhd->i_width / BLOCK16x16;
p_track->i_height = p_tkhd->data.p_tkhd->i_height / BLOCK16x16;
p_track->f_rotation = p_tkhd->data.p_tkhd->f_rotation;
if( p_tref )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment