1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 17:42:17 +00:00

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.
This commit is contained in:
wm4 2013-04-14 23:23:00 +02:00
parent 23da9e68e8
commit afd8d7f2db

View File

@ -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;
}