[vlc-commits] demux: asf: fix signedness in language index
Francois Cartegnie
git at videolan.org
Sun Dec 8 23:18:11 CET 2013
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Dec 7 20:10:49 2013 +0100| [28b9474591f313ea603fc42710f353d9f037c7be] | committer: Francois Cartegnie
demux: asf: fix signedness in language index
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=28b9474591f313ea603fc42710f353d9f037c7be
---
modules/demux/asf/asf.c | 1 -
modules/demux/asf/libasf.c | 6 +++---
modules/demux/asf/libasf.h | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index f234754..d4773a3 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -1312,7 +1312,6 @@ static int DemuxInit( demux_t *p_demux )
if( fmt.i_cat != UNKNOWN_ES )
{
if( p_esp && p_languages &&
- p_esp->i_language_index >= 0 &&
p_esp->i_language_index < p_languages->i_language )
{
fmt.psz_language = strdup( p_languages->ppsz_language[p_esp->i_language_index] );
diff --git a/modules/demux/asf/libasf.c b/modules/demux/asf/libasf.c
index db121a3..f9c74ae 100644
--- a/modules/demux/asf/libasf.c
+++ b/modules/demux/asf/libasf.c
@@ -769,7 +769,7 @@ static int ASF_ReadObject_language_list(stream_t *s, asf_object_t *p_obj)
asf_object_language_list_t *p_ll = &p_obj->language_list;
const uint8_t *p_peek, *p_data;
int i_peek;
- int i;
+ uint16_t i;
if( ( i_peek = stream_Peek( s, &p_peek, p_ll->i_object_size ) ) < 26 )
return VLC_EGENERIC;
@@ -793,7 +793,7 @@ static int ASF_ReadObject_language_list(stream_t *s, asf_object_t *p_obj)
}
#ifdef ASF_DEBUG
- msg_Dbg( s, "read \"language list object\" %d entries",
+ msg_Dbg( s, "read \"language list object\" %u entries",
p_ll->i_language );
for( i = 0; i < p_ll->i_language; i++ )
msg_Dbg( s, " - '%s'",
@@ -805,7 +805,7 @@ static int ASF_ReadObject_language_list(stream_t *s, asf_object_t *p_obj)
static void ASF_FreeObject_language_list( asf_object_t *p_obj)
{
asf_object_language_list_t *p_ll = &p_obj->language_list;
- int i;
+ uint16_t i;
for( i = 0; i < p_ll->i_language; i++ )
FREENULL( p_ll->ppsz_language[i] );
diff --git a/modules/demux/asf/libasf.h b/modules/demux/asf/libasf.h
index c126356..a4242c2 100644
--- a/modules/demux/asf/libasf.h
+++ b/modules/demux/asf/libasf.h
@@ -230,7 +230,7 @@ typedef struct
typedef struct
{
ASF_OBJECT_COMMON
- int i_language;
+ uint16_t i_language;
char **ppsz_language;
} asf_object_language_list_t;
@@ -275,7 +275,7 @@ typedef struct
int32_t i_flags;
int16_t i_stream_number;
- int16_t i_language_index;
+ uint16_t i_language_index;
int64_t i_average_time_per_frame;
int i_stream_name_count;
More information about the vlc-commits
mailing list