[vlc-devel] [PATCH] packetizer: vc1: make the aspect ratio and frame rate unsigned

Steve Lhomme robux4 at videolabs.io
Tue Apr 4 15:13:19 CEST 2017


Although the aspect ratio is read, it's displayed in the logs but not used.
---
 modules/packetizer/vc1.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/packetizer/vc1.c b/modules/packetizer/vc1.c
index fab961b199..de817c644e 100644
--- a/modules/packetizer/vc1.c
+++ b/modules/packetizer/vc1.c
@@ -516,7 +516,7 @@ static block_t *ParseIDU( decoder_t *p_dec, bool *pb_ts_used, block_t *p_frag )
 
                 if( bs_read( &s, 1 ) )  /* Pixel aspect ratio (PAR/SAR) */
                 {
-                    static const int p_ar[16][2] = {
+                    static const unsigned p_ar[16][2] = {
                         { 0, 0}, { 1, 1}, {12,11}, {10,11}, {16,11}, {40,33},
                         {24,11}, {20,11}, {32,11}, {80,33}, {18,11}, {15,11},
                         {64,33}, {160,99},{ 0, 0}, { 0, 0}
@@ -541,8 +541,8 @@ static block_t *ParseIDU( decoder_t *p_dec, bool *pb_ts_used, block_t *p_frag )
             }
             if( bs_read( &s, 1 ) )  /* Frame rate */
             {
-                int i_fps_num = 0;
-                int i_fps_den = 0;
+                unsigned i_fps_num = 0;
+                unsigned i_fps_den = 0;
                 if( bs_read( &s, 1 ) )
                 {
                     i_fps_num = bs_read( &s, 16 )+1;
-- 
2.11.1



More information about the vlc-devel mailing list