aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh de Kock <josh@itanimul.li>2018-04-01 03:17:07 +0100
committerJosh de Kock <josh@itanimul.li>2018-04-02 03:26:22 +0100
commitd1221f335183a07dae761551188677551e5ba792 (patch)
tree340ffaaa118289eae9d656b2fc6726c2178210f7
parent85bf89885a97c18bfaf9dbe30321af9a58a1444d (diff)
downloadffmpeg-d1221f335183a07dae761551188677551e5ba792.tar.gz
lavf/format: use const AVInputFormat for iteration
Signed-off-by: Josh de Kock <josh@itanimul.li>
-rw-r--r--libavformat/format.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/format.c b/libavformat/format.c
index 1b2ce22e25..1c66afb7e6 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -117,11 +117,11 @@ enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
AVInputFormat *av_find_input_format(const char *short_name)
{
- AVInputFormat *fmt = NULL;
+ const AVInputFormat *fmt = NULL;
void *i = 0;
while ((fmt = av_demuxer_iterate(&i)))
if (av_match_name(short_name, fmt->name))
- return fmt;
+ return (AVInputFormat*)fmt;
return NULL;
}
@@ -129,7 +129,8 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
int *score_ret)
{
AVProbeData lpd = *pd;
- AVInputFormat *fmt1 = NULL, *fmt;
+ const AVInputFormat *fmt1 = NULL;
+ AVInputFormat *fmt = NULL;
int score, score_max = 0;
void *i = 0;
const static uint8_t zerobuffer[AVPROBE_PADDING_SIZE];
@@ -156,7 +157,6 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
nodat = ID3_GREATER_PROBE;
}
- fmt = NULL;
while ((fmt1 = av_demuxer_iterate(&i))) {
if (!is_opened == !(fmt1->flags & AVFMT_NOFILE) && strcmp(fmt1->name, "image2"))
continue;
@@ -191,7 +191,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
}
if (score > score_max) {
score_max = score;
- fmt = fmt1;
+ fmt = (AVInputFormat*)fmt1;
} else if (score == score_max)
fmt = NULL;
}