]> git.sesse.net Git - vlc/commitdiff
libmp4: Move variable declaration to avoid unused variable warning
authorDiego Biurrun <diego@biurrun.de>
Tue, 9 Dec 2014 15:58:08 +0000 (16:58 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 9 Dec 2014 18:08:34 +0000 (19:08 +0100)
demux/mp4/libmp4.c:858:12: warning: variable ‘translate’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mp4/libmp4.c

index 45b54c2b160ba2447743a1a04908c3fd0e01ab13..48f4fdb11d494133e96ec70241608704d4441eec 100644 (file)
@@ -855,13 +855,8 @@ static int MP4_ReadBox_tkhd(  stream_t *p_stream, MP4_Box_t *p_box )
 
     double rotation;    //angle in degrees to be rotated clockwise
     double scale[2];    // scale factor; sx = scale[0] , sy = scale[1]
-    double translate[2];// amount to translate; tx = translate[0] , ty = translate[1]
-
     int32_t *matrix = p_box->data.p_tkhd->i_matrix;
 
-    translate[0] = conv_fx(matrix[6]);
-    translate[1] = conv_fx(matrix[7]);
-
     scale[0] = sqrt(conv_fx(matrix[0]) * conv_fx(matrix[0]) +
                     conv_fx(matrix[3]) * conv_fx(matrix[3]));
     scale[1] = sqrt(conv_fx(matrix[1]) * conv_fx(matrix[1]) +
@@ -875,6 +870,11 @@ static int MP4_ReadBox_tkhd(  stream_t *p_stream, MP4_Box_t *p_box )
     p_box->data.p_tkhd->f_rotation = rotation;
 
 #ifdef MP4_VERBOSE
+    double translate[2];// amount to translate; tx = translate[0] , ty = translate[1]
+
+    translate[0] = conv_fx(matrix[6]);
+    translate[1] = conv_fx(matrix[7]);
+
     MP4_ConvertDate2Str( s_creation_time, p_box->data.p_mvhd->i_creation_time, false );
     MP4_ConvertDate2Str( s_modification_time, p_box->data.p_mvhd->i_modification_time, false );
     MP4_ConvertDate2Str( s_duration, p_box->data.p_mvhd->i_duration, true );