aboutsummaryrefslogtreecommitdiffstats
path: root/ffprobe.c
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2013-12-29 10:37:58 +0100
committerNicolas George <george@nsup.org>2013-12-30 10:58:01 +0100
commita55692a96099c40aabb25e1443890be99f9c845c (patch)
tree0cab84a64c595c423e27eeabca081202cffdac61 /ffprobe.c
parentbcfcb8b8524dfcc1c37d520ccf3fba3b3a4c104d (diff)
downloadffmpeg-a55692a96099c40aabb25e1443890be99f9c845c.tar.gz
ffprobe: check av_frame_alloc() failure.
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c4
1 files changed, 4 insertions, 0 deletions
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;