From a55692a96099c40aabb25e1443890be99f9c845c Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Sun, 29 Dec 2013 10:37:58 +0100 Subject: [PATCH] ffprobe: check av_frame_alloc() failure. --- ffprobe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ffprobe.c b/ffprobe.c index 0374d372ab..ef3bcc63f6 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -1887,6 +1887,10 @@ static int read_interval_packets(WriterContext *w, AVFormatContext *fmt_ctx, } frame = av_frame_alloc(); + if (!frame) { + ret = AVERROR(ENOMEM); + goto end; + } while (!av_read_frame(fmt_ctx, &pkt)) { if (selected_streams[pkt.stream_index]) { AVRational tb = fmt_ctx->streams[pkt.stream_index]->time_base;