Merge commit 'd07b51bf0733fe58bbfa13c448775dc325463cb4'
* commit 'd07b51bf0733fe58bbfa13c448775dc325463cb4': aviobuf: Handle a NULL buffer in avio_close_dyn_buf Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
81c3bb78ac
@ -1034,6 +1034,11 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
|
|||||||
static const char padbuf[FF_INPUT_BUFFER_PADDING_SIZE] = {0};
|
static const char padbuf[FF_INPUT_BUFFER_PADDING_SIZE] = {0};
|
||||||
int padding = 0;
|
int padding = 0;
|
||||||
|
|
||||||
|
if (!s) {
|
||||||
|
*pbuffer = NULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* don't attempt to pad fixed-size packet buffers */
|
/* don't attempt to pad fixed-size packet buffers */
|
||||||
if (!s->max_packet_size) {
|
if (!s->max_packet_size) {
|
||||||
avio_write(s, padbuf, sizeof(padbuf));
|
avio_write(s, padbuf, sizeof(padbuf));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user