[FFmpeg-cvslog] avformat/utils: Print warning if reallocating probe buffer failed

Michael Niedermayer git at videolan.org
Tue Sep 17 13:15:29 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 17 13:09:24 2013 +0200| [e960b3e27e6091c3ce90b6dab2970c8a15884055] | committer: Michael Niedermayer

avformat/utils: Print warning if reallocating probe buffer failed

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e960b3e27e6091c3ce90b6dab2970c8a15884055
---

 libavformat/utils.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3f08528..20770da 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;



More information about the ffmpeg-cvslog mailing list