aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2013-12-29 10:37:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-07 21:28:41 +0100
commita6ba0f7be91fcb4738d226b3b100a4750baf4340 (patch)
treef3debc42ce42869452cb80fe8d096df0f6b8b919
parent89205b637e23c27f43c15e3e60cab29e9bda5a38 (diff)
downloadffmpeg-a6ba0f7be91fcb4738d226b3b100a4750baf4340.tar.gz
ffprobe: check av_frame_alloc() failure.
(cherry picked from commit a55692a96099c40aabb25e1443890be99f9c845c) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffprobe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffprobe.c b/ffprobe.c
index d07a58b1c2..a7aef02ebf 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1668,6 +1668,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;