Browse Source

lavf: Switch probesize and max_analyze_duration to 64bit.

Both are only accessible through AVOptions.
tags/n3.0
Carl Eugen Hoyos 9 years ago
parent
commit
b290972b8f
6 changed files with 13 additions and 12 deletions
  1. +4
    -0
      doc/APIchanges
  2. +3
    -3
      libavformat/avformat.h
  3. +1
    -1
      libavformat/mpegts.c
  4. +2
    -2
      libavformat/options_table.h
  5. +2
    -2
      libavformat/utils.c
  6. +1
    -4
      libavformat/version.h

+ 4
- 0
doc/APIchanges View File

@@ -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


+ 3
- 3
libavformat/avformat.h View File

@@ -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;


+ 1
- 1
libavformat/mpegts.c View File

@@ -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;


+ 2
- 2
libavformat/options_table.h View File

@@ -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},


+ 2
- 2
libavformat/utils.c View File

@@ -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;


+ 1
- 4
libavformat/version.h View File

@@ -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


Loading…
Cancel
Save