From afd8d7f2db68e06fa0a6a609be45573adef2c1de Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 14 Apr 2013 23:23:00 +0200 Subject: [PATCH] demux: fix clearing of input padding MP_INPUT_BUFFER_PADDING_SIZE and FF_INPUT_BUFFER_PADDING_SIZE are both 16. The doxygen for FF_INPUT_BUFFER_PADDING_SIZE says only the first 23 bits must to be 0, but this is probably a lie. --- demux/demux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demux/demux.c b/demux/demux.c index 90e241139f..7d76bfa56e 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -129,7 +129,7 @@ struct demux_packet *new_demux_packet(size_t len) mp_msg(MSGT_DEMUXER, MSGL_FATAL, "Memory allocation failure!\n"); abort(); } - memset(dp->buffer + len, 0, 8); + memset(dp->buffer + len, 0, MP_INPUT_BUFFER_PADDING_SIZE); return dp; } @@ -160,7 +160,7 @@ void resize_demux_packet(struct demux_packet *dp, size_t len) mp_msg(MSGT_DEMUXER, MSGL_FATAL, "Memory allocation failure!\n"); abort(); } - memset(dp->buffer + len, 0, 8); + memset(dp->buffer + len, 0, MP_INPUT_BUFFER_PADDING_SIZE); dp->len = len; }