mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
libschroedingerdec: check malloc
Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
parent
3b52e9da10
commit
a7fa5ce671
@ -106,6 +106,11 @@ static SchroBuffer *FindNextSchroParseUnit(SchroParseUnitContext *parse_ctx)
|
||||
return NULL;
|
||||
|
||||
in_buf = av_malloc(next_pu_offset);
|
||||
if (!in_buf) {
|
||||
av_log(parse_ctx, AV_LOG_ERROR, "Unable to allocate input buffer\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(in_buf, parse_ctx->buf, next_pu_offset);
|
||||
enc_buf = schro_buffer_new_with_data(in_buf, next_pu_offset);
|
||||
enc_buf->free = libschroedinger_decode_buffer_free;
|
||||
|
Loading…
Reference in New Issue
Block a user