[FFmpeg-cvslog] lavf: Switch probesize and max_analyze_duration to 64bit.

Carl Eugen Hoyos git at videolan.org
Tue Sep 15 18:17:43 CEST 2015


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Sep 15 17:36:38 2015 +0200| [b290972b8ff82272d4905166f8f0cbb3a6c49ff8] | committer: Carl Eugen Hoyos

lavf: Switch probesize and max_analyze_duration to 64bit.

Both are only accessible through AVOptions.

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

 doc/APIchanges              |    4 ++++
 libavformat/avformat.h      |    6 +++---
 libavformat/mpegts.c        |    2 +-
 libavformat/options_table.h |    4 ++--
 libavformat/utils.c         |    4 ++--
 libavformat/version.h       |    5 +----
 6 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 7cde366..728c756 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil:     2015-08-28
 
 API changes, most recent first:
 
+2015-09-15 - lavf 57.2.100 - avformat.h
+  probesize and max_analyze_duration switched to 64bit, both
+  are only accessible through AVOptions
+
 2015-09-15 - lavf 57.1.100 - avformat.h
   bit_rate was changed to 64bit, make sure you update any
   printf() or other type sensitive code
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 825e636..57dc62e 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1395,7 +1395,7 @@ typedef struct AVFormatContext {
 #define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Don't merge side data but keep it separate.
 #define AVFMT_FLAG_FAST_SEEK   0x80000 ///< Enable fast, but inaccurate seeks for some formats
 
-#if FF_API_PROBESIZE_32
+#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
     /**
      * @deprecated deprecated in favor of probesize2
      */
@@ -1759,7 +1759,7 @@ typedef struct AVFormatContext {
      * via AVOptions (NO direct access).
      * Can be set to 0 to let avformat choose using a heuristic.
      */
-#if FF_API_PROBESIZE_32
+#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
     int64_t max_analyze_duration2;
 #else
     int64_t max_analyze_duration;
@@ -1771,7 +1771,7 @@ typedef struct AVFormatContext {
      * Demuxing only, set by the caller before avformat_open_input()
      * via AVOptions (NO direct access).
      */
-#if FF_API_PROBESIZE_32
+#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
     int64_t probesize2;
 #else
     int64_t probesize;
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index ed0a86b..c35cc9d 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2513,7 +2513,7 @@ static int mpegts_read_header(AVFormatContext *s)
     uint8_t buf[8 * 1024] = {0};
     int len;
     int64_t pos, probesize =
-#if FF_API_PROBESIZE_32
+#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
                              s->probesize ? s->probesize : s->probesize2;
 #else
                              s->probesize;
diff --git a/libavformat/options_table.h b/libavformat/options_table.h
index 773814a..6e66c27 100644
--- a/libavformat/options_table.h
+++ b/libavformat/options_table.h
@@ -36,7 +36,7 @@
 static const AVOption avformat_options[] = {
 {"avioflags", NULL, OFFSET(avio_flags), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "avioflags"},
 {"direct", "reduce buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVIO_FLAG_DIRECT }, INT_MIN, INT_MAX, D|E, "avioflags"},
-#if FF_API_PROBESIZE_32
+#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
 {"probesize", "set probing size", OFFSET(probesize2), AV_OPT_TYPE_INT64, {.i64 = 5000000 }, 32, INT64_MAX, D},
 #else
 {"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT64, {.i64 = 5000000 }, 32, INT64_MAX, D},
@@ -58,7 +58,7 @@ static const AVOption avformat_options[] = {
 {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"},
 {"seek2any", "allow seeking to non-keyframes on demuxer level when supported", OFFSET(seek2any), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, D},
 {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" },
-#if FF_API_PROBESIZE_32
+#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
 {"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration2), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D},
 #else
 {"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D},
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 96a1e86..0d68dee 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3085,14 +3085,14 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
     // new streams might appear, no options for those
     int orig_nb_streams = ic->nb_streams;
     int flush_codecs;
-#if FF_API_PROBESIZE_32
+#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
     int64_t max_analyze_duration = ic->max_analyze_duration2;
 #else
     int64_t max_analyze_duration = ic->max_analyze_duration;
 #endif
     int64_t max_stream_analyze_duration;
     int64_t max_subtitle_analyze_duration;
-#if FF_API_PROBESIZE_32
+#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
     int64_t probesize = ic->probesize2;
 #else
     int64_t probesize = ic->probesize;
diff --git a/libavformat/version.h b/libavformat/version.h
index 3444908..743617e 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -30,7 +30,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVFORMAT_VERSION_MAJOR  57
-#define LIBAVFORMAT_VERSION_MINOR   1
+#define LIBAVFORMAT_VERSION_MINOR   2
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -65,9 +65,6 @@
 #ifndef FF_API_URL_FEOF
 #define FF_API_URL_FEOF                 (LIBAVFORMAT_VERSION_MAJOR < 58)
 #endif
-#ifndef FF_API_PROBESIZE_32
-#define FF_API_PROBESIZE_32             (LIBAVFORMAT_VERSION_MAJOR < 58)
-#endif
 
 #ifndef FF_API_R_FRAME_RATE
 #define FF_API_R_FRAME_RATE            1



More information about the ffmpeg-cvslog mailing list