aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-17 13:09:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-17 13:09:24 +0200
commite960b3e27e6091c3ce90b6dab2970c8a15884055 (patch)
tree3e4123208f014e6d4f49b5abe0a80a043d67cd2e /libavformat/utils.c
parent01b4689d2032994f3eac790f11e5d062b6f945db (diff)
downloadffmpeg-e960b3e27e6091c3ce90b6dab2970c8a15884055.tar.gz
avformat/utils: Print warning if reallocating probe buffer failed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3f08528a6a..20770da2b8 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -589,8 +589,12 @@ static int probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
if (pkt) {
uint8_t *new_buf = av_realloc(pd->buf, pd->buf_size+pkt->size+AVPROBE_PADDING_SIZE);
- if(!new_buf)
+ if(!new_buf) {
+ av_log(s, AV_LOG_WARNING,
+ "Failed to reallocate probe buffer for stream %d\n",
+ st->index);
goto no_packet;
+ }
pd->buf = new_buf;
memcpy(pd->buf+pd->buf_size, pkt->data, pkt->size);
pd->buf_size += pkt->size;