[FFmpeg-cvslog] avformat/demux: Use av_opt_set_int() where appropriate

Andreas Rheinhardt git at videolan.org
Sun Sep 19 01:32:24 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Sep 17 17:17:18 2021 +0200| [cef920853fece79c306c4d1c4873a22013609292] | committer: Andreas Rheinhardt

avformat/demux: Use av_opt_set_int() where appropriate

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavformat/demux.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/demux.c b/libavformat/demux.c
index 714146039f..d7393d5b46 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -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. */



More information about the ffmpeg-cvslog mailing list