aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorJan Gerber <j@v2v.cc>2013-11-14 12:58:28 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-16 00:49:23 +0100
commitf4b1ca99ff86c6ba78e1b4730c85eac0d5a5817a (patch)
tree3379ad6b0ede688c1bd985c70021529c3737e115 /libavformat/matroskaenc.c
parent150c5543ffeec761da99a7082ac6d02f0312f971 (diff)
downloadffmpeg-f4b1ca99ff86c6ba78e1b4730c85eac0d5a5817a.tar.gz
lavf/matroska*: DiscardPadding is a signed integer
according to the Matriska Specification http://matroska.org/technical/specs/index.html DiscardPadding is a signed integer. Tested-by: Jan Gerber <j@v2v.cc> Tested-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 3f466d0eaa..eaeccdeb87 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1337,7 +1337,8 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb,
uint8_t *data = NULL, *side_data = NULL;
int offset = 0, size = pkt->size, side_data_size = 0;
int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts;
- uint64_t additional_id = 0, discard_padding = 0;
+ uint64_t additional_id = 0;
+ int64_t discard_padding = 0;
ebml_master block_group, block_additions, block_more;
av_log(s, AV_LOG_DEBUG, "Writing block at offset %" PRIu64 ", size %d, "
@@ -1396,7 +1397,7 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb,
av_free(data);
if (discard_padding) {
- put_ebml_uint(pb, MATROSKA_ID_DISCARDPADDING, discard_padding);
+ put_ebml_sint(pb, MATROSKA_ID_DISCARDPADDING, discard_padding);
}
if (side_data_size && additional_id == 1) {