diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-15 16:01:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-24 15:27:01 +0200 |
commit | e377b50b2df9ea8bcaccae8ed14aa2dee56c619c (patch) | |
tree | b24a64eae376a2b78f7b0be396ed25fda1122c50 | |
parent | d0ab71ed11c54c40b1c975c713dee8d3993ccdc5 (diff) | |
download | ffmpeg-e377b50b2df9ea8bcaccae8ed14aa2dee56c619c.tar.gz |
matroskaenc: avoid implicit truncation in avio_w*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/matroskaenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index bd1344c11f..2a8a2eaaa1 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -118,7 +118,7 @@ static void put_ebml_id(AVIOContext *pb, unsigned int id) { int i = ebml_id_size(id); while (i--) - avio_w8(pb, id >> (i*8)); + avio_w8(pb, (uint8_t)(id >> (i*8))); } /** @@ -166,7 +166,7 @@ static void put_ebml_num(AVIOContext *pb, uint64_t num, int bytes) num |= 1ULL << bytes*7; for (i = bytes - 1; i >= 0; i--) - avio_w8(pb, num >> i*8); + avio_w8(pb, (uint8_t)(num >> i*8)); } static void put_ebml_uint(AVIOContext *pb, unsigned int elementid, uint64_t val) @@ -178,7 +178,7 @@ static void put_ebml_uint(AVIOContext *pb, unsigned int elementid, uint64_t val) put_ebml_id(pb, elementid); put_ebml_num(pb, bytes, 0); for (i = bytes - 1; i >= 0; i--) - avio_w8(pb, val >> i*8); + avio_w8(pb, (uint8_t)(val >> i*8)); } static void put_ebml_float(AVIOContext *pb, unsigned int elementid, double val) |