It is treated not as **AVDictionary, but as an array of such.
Show it in declaration.
---
libavformat/avformat.h | 2 +-
libavformat/utils.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index fff911a..23fb759 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1433,7 +1433,7 @@ int av_find_stream_info(AVFormatContext *ic);
* @todo Let the user decide somehow what information is needed so that
* we do not waste time getting stuff the user does not need.
*/
-int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
+int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options[]);
/**
* Find the "best" stream in the file.
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 373f068..8bc983e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2271,7 +2271,7 @@ int av_find_stream_info(AVFormatContext *ic)
}
#endif
-int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
+int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options[])
{
int i, count, ret, read_size, j;
AVStream *st;
@@ -2303,12 +2303,12 @@ int avformat_find_stream_info(AVFormatContext
*ic, AVDictionary **options)
/* Ensure that subtitle_header is properly set. */
if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE
&& codec && !st->codec->codec)
- avcodec_open2(st->codec, codec, options ? &options[i] : NULL);
+ avcodec_open2(st->codec, codec, options ? options[i] : NULL);
//try to just open decoders, in case this is enough to get parameters
if(!has_codec_parameters(st->codec)){
if (codec && !st->codec->codec)
- avcodec_open2(st->codec, codec, options ? &options[i] : NULL);
+ avcodec_open2(st->codec, codec, options ? options[i] : NULL);
}
}
@@ -2386,7 +2386,7 @@ int avformat_find_stream_info(AVFormatContext
*ic, AVDictionary **options)
/* flush the decoders */
while ((err = try_decode_frame(st, &empty_pkt,
(options && i <
orig_nb_streams) ?
- &options[i] : NULL)) >= 0)
+ options[i] : NULL)) >= 0)
if (has_codec_parameters(st->codec))
break;
@@ -2461,7 +2461,7 @@ int avformat_find_stream_info(AVFormatContext
*ic, AVDictionary **options)
least one frame of codec data, this makes sure the codec initializes
the channel configuration and does not only trust the
values from the container.
*/
- try_decode_frame(st, pkt, (options && i < orig_nb_streams ) ?
&options[i] : NULL);
+ try_decode_frame(st, pkt, (options && i < orig_nb_streams ) ?
options[i] : NULL);
st->codec_info_nb_frames++;
count++;
--
1.7.3.4
--
Andrey Utkin
From f2bbbbc9cb94a3f47c4703cfb3d9b2575d26fc7d Mon Sep 17 00:00:00 2001
From: Andrey Utkin <[email protected]>
Date: Wed, 18 Jan 2012 11:50:46 +0000
Subject: [PATCH] Declare avformat_find_stream_info 'options' param with real type
It is treated not as **AVDictionary, but as an array of such.
Show it in declaration.
---
libavformat/avformat.h | 2 +-
libavformat/utils.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index fff911a..23fb759 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1433,7 +1433,7 @@ int av_find_stream_info(AVFormatContext *ic);
* @todo Let the user decide somehow what information is needed so that
* we do not waste time getting stuff the user does not need.
*/
-int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
+int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options[]);
/**
* Find the "best" stream in the file.
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 373f068..8bc983e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2271,7 +2271,7 @@ int av_find_stream_info(AVFormatContext *ic)
}
#endif
-int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
+int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options[])
{
int i, count, ret, read_size, j;
AVStream *st;
@@ -2303,12 +2303,12 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
/* Ensure that subtitle_header is properly set. */
if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE
&& codec && !st->codec->codec)
- avcodec_open2(st->codec, codec, options ? &options[i] : NULL);
+ avcodec_open2(st->codec, codec, options ? options[i] : NULL);
//try to just open decoders, in case this is enough to get parameters
if(!has_codec_parameters(st->codec)){
if (codec && !st->codec->codec)
- avcodec_open2(st->codec, codec, options ? &options[i] : NULL);
+ avcodec_open2(st->codec, codec, options ? options[i] : NULL);
}
}
@@ -2386,7 +2386,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
/* flush the decoders */
while ((err = try_decode_frame(st, &empty_pkt,
(options && i < orig_nb_streams) ?
- &options[i] : NULL)) >= 0)
+ options[i] : NULL)) >= 0)
if (has_codec_parameters(st->codec))
break;
@@ -2461,7 +2461,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
least one frame of codec data, this makes sure the codec initializes
the channel configuration and does not only trust the values from the container.
*/
- try_decode_frame(st, pkt, (options && i < orig_nb_streams ) ? &options[i] : NULL);
+ try_decode_frame(st, pkt, (options && i < orig_nb_streams ) ? options[i] : NULL);
st->codec_info_nb_frames++;
count++;
--
1.7.3.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel