Skip to content

Commit

Permalink
ffprobe: check av_frame_alloc() failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cigaes committed Dec 30, 2013
1 parent bcfcb8b commit a55692a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ffprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a55692a

Please sign in to comment.