ffprobe: check av_frame_alloc() failure.

(cherry picked from commit a55692a96099c40aabb25e1443890be99f9c845c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Nicolas George 2013-12-29 10:37:58 +01:00 committed by Michael Niedermayer
parent 89205b637e
commit a6ba0f7be9

View File

@ -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;