diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-28 16:10:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-28 17:29:26 +0100 |
commit | de96e20be959f4df9b8539da0dcc41db5167790e (patch) | |
tree | 9e91bc42bf72b8f39cb6cf45749bb1399fd38fc1 | |
parent | 2b4543ff696893e925a32eac5de2259dff243696 (diff) | |
download | ffmpeg-de96e20be959f4df9b8539da0dcc41db5167790e.tar.gz |
avfilter/lavfutils: call av_find_stream_info() before reading various information about the stream
No testcase with unmodified source is known
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/lavfutils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index 58d98cfdb6..93f1ef331d 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -44,6 +44,11 @@ int ff_load_image(uint8_t *data[4], int linesize[4], return ret; } + if ((ret = avformat_find_stream_info(format_ctx, NULL)) < 0) { + av_log(log_ctx, AV_LOG_ERROR, "Find stream info failed\n"); + return ret; + } + codec_ctx = format_ctx->streams[0]->codec; codec = avcodec_find_decoder(codec_ctx->codec_id); if (!codec) { |