From 3009f521f390b2bd440d9747a9c6baf648b2087a Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 25 May 2011 16:59:51 +0200 Subject: ffplay: use new avcodec_open2 and avformat_find_stream_info API. --- cmdutils.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cmdutils.c') diff --git a/cmdutils.c b/cmdutils.c index a2fe103f9b..b375378af9 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -912,6 +912,23 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, int e return ret; } +AVDictionary **setup_find_stream_info_opts(AVFormatContext *s) +{ + int i; + AVDictionary **opts; + + if (!s->nb_streams) + return NULL; + opts = av_mallocz(s->nb_streams * sizeof(*opts)); + if (!opts) { + av_log(NULL, AV_LOG_ERROR, "Could not alloc memory for stream options.\n"); + return NULL; + } + for (i = 0; i < s->nb_streams; i++) + opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codec->codec_id, 0); + return opts; +} + #if CONFIG_AVFILTER static int ffsink_init(AVFilterContext *ctx, const char *args, void *opaque) -- cgit v1.2.3