Commit 81c3bb78 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'd07b51bf'

* commit 'd07b51bf':
  aviobuf: Handle a NULL buffer in avio_close_dyn_buf
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 382545ae d07b51bf
......@@ -1034,6 +1034,11 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
static const char padbuf[FF_INPUT_BUFFER_PADDING_SIZE] = {0};
int padding = 0;
if (!s) {
*pbuffer = NULL;
return 0;
}
/* don't attempt to pad fixed-size packet buffers */
if (!s->max_packet_size) {
avio_write(s, padbuf, sizeof(padbuf));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment