[FFmpeg-cvslog] cmdutils: add codec_opts parameter to setup_find_stream_info_opts()

Stefano Sabatini git at videolan.org
Fri Jul 29 02:08:40 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sun Jul 17 16:19:28 2011 +0200| [8ec19f84e12283dd79c16782ab55dd3b4e1ded66] | committer: Anton Khirnov

cmdutils: add codec_opts parameter to setup_find_stream_info_opts()

Avoid brittle and obfuscating reference to a global.

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ec19f84e12283dd79c16782ab55dd3b4e1ded66
---

 cmdutils.c |    2 +-
 cmdutils.h |    2 +-
 ffmpeg.c   |    2 +-
 ffplay.c   |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index 19c5d72..f6e50fa 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -806,7 +806,7 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, int e
     return ret;
 }
 
-AVDictionary **setup_find_stream_info_opts(AVFormatContext *s)
+AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts)
 {
     int i;
     AVDictionary **opts;
diff --git a/cmdutils.h b/cmdutils.h
index dcd0b79..7769194 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -170,7 +170,7 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, int e
  * @return pointer to the created array of dictionaries, NULL if it
  * cannot be created
  */
-AVDictionary **setup_find_stream_info_opts(AVFormatContext *s);
+AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts);
 
 /**
  * Print an error message to stderr, indicating filename and a human
diff --git a/ffmpeg.c b/ffmpeg.c
index 776cfab..c76aeac 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3252,7 +3252,7 @@ static int opt_input_file(const char *opt, const char *filename)
     }
 
     /* Set AVCodecContext options for avformat_find_stream_info */
-    opts = setup_find_stream_info_opts(ic);
+    opts = setup_find_stream_info_opts(ic, codec_opts);
     orig_nb_streams = ic->nb_streams;
 
     /* If not enough info to get the stream parameters, we decode the
diff --git a/ffplay.c b/ffplay.c
index 77c9d4b..bef75fe 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2343,7 +2343,7 @@ static int decode_thread(void *arg)
     if(genpts)
         ic->flags |= AVFMT_FLAG_GENPTS;
 
-    opts = setup_find_stream_info_opts(ic);
+    opts = setup_find_stream_info_opts(ic, codec_opts);
     orig_nb_streams = ic->nb_streams;
 
     err = avformat_find_stream_info(ic, opts);



More information about the ffmpeg-cvslog mailing list