avformat/demux: Use av_opt_set_int() where appropriate

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-17 17:17:18 +02:00
parent 4e0da7d311
commit cef920853f
1 changed files with 4 additions and 4 deletions

View File

@ -1733,7 +1733,7 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
goto skip_duration_calc;
}
av_opt_set(ic, "skip_changes", "1", AV_OPT_SEARCH_CHILDREN);
av_opt_set_int(ic, "skip_changes", 1, AV_OPT_SEARCH_CHILDREN);
/* estimate the end time (duration) */
/* XXX: may need to support wrapping */
filesize = ic->pb ? avio_size(ic->pb) : 0;
@ -1804,7 +1804,7 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
offset &&
++retry <= DURATION_MAX_RETRY);
av_opt_set(ic, "skip_changes", "0", AV_OPT_SEARCH_CHILDREN);
av_opt_set_int(ic, "skip_changes", 0, AV_OPT_SEARCH_CHILDREN);
/* warn about audio/video streams which duration could not be estimated */
for (unsigned i = 0; i < ic->nb_streams; i++) {
@ -2412,7 +2412,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
flush_codecs = probesize > 0;
av_opt_set(ic, "skip_clear", "1", AV_OPT_SEARCH_CHILDREN);
av_opt_set_int(ic, "skip_clear", 1, AV_OPT_SEARCH_CHILDREN);
max_stream_analyze_duration = max_analyze_duration;
max_subtitle_analyze_duration = max_analyze_duration;
@ -2884,7 +2884,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
if (probesize)
estimate_timings(ic, old_offset);
av_opt_set(ic, "skip_clear", "0", AV_OPT_SEARCH_CHILDREN);
av_opt_set_int(ic, "skip_clear", 0, AV_OPT_SEARCH_CHILDREN);
if (ret >= 0 && ic->nb_streams)
/* We could not have all the codec parameters before EOF. */