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;