[FFmpeg-devel] [PATCH 2/7] ffprobe: check av_frame_alloc() failure.
Nicolas George
george at nsup.org
Sun Dec 29 11:11:43 CET 2013
Signed-off-by: Nicolas George <george at nsup.org>
---
ffprobe.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ffprobe.c b/ffprobe.c
index 0374d37..ef3bcc6 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;
--
1.8.5.2
More information about the ffmpeg-devel
mailing list