[FFmpeg-cvslog] ffprobe: check av_frame_alloc() failure.
Nicolas George
git at videolan.org
Mon Dec 30 13:37:38 CET 2013
ffmpeg | branch: master | Nicolas George <george at nsup.org> | Sun Dec 29 10:37:58 2013 +0100| [a55692a96099c40aabb25e1443890be99f9c845c] | committer: Nicolas George
ffprobe: check av_frame_alloc() failure.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a55692a96099c40aabb25e1443890be99f9c845c
---
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;
More information about the ffmpeg-cvslog
mailing list