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:
parent
23da9e68e8
commit
afd8d7f2db
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user