Browse Source

avcodec/parser: Print an error in case of reallocation fails in ff_combine_frame()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
11aa050a25
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/parser.c

+ 2
- 0
libavcodec/parser.c View File

@@ -255,6 +255,7 @@ int ff_combine_frame(ParseContext *pc, int next,
FF_INPUT_BUFFER_PADDING_SIZE);

if (!new_buffer) {
av_log(NULL, AV_LOG_ERROR, "Failed to reallocate parser buffer to %d\n", *buf_size + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
pc->index = 0;
return AVERROR(ENOMEM);
}
@@ -273,6 +274,7 @@ int ff_combine_frame(ParseContext *pc, int next,
next + pc->index +
FF_INPUT_BUFFER_PADDING_SIZE);
if (!new_buffer) {
av_log(NULL, AV_LOG_ERROR, "Failed to reallocate parser buffer to %d\n", next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
pc->overread_index =
pc->index = 0;
return AVERROR(ENOMEM);


Loading…
Cancel
Save