Commit fbc13391 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Allow values >31bit for -analyzeduration.
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 3a76d7f7 5482780a
...@@ -15,6 +15,10 @@ libavutil: 2012-10-22 ...@@ -15,6 +15,10 @@ libavutil: 2012-10-22
API changes, most recent first: API changes, most recent first:
2014-06-10 - xxxxxxx - lavf 55.43.100 - avformat.h
New field int64_t max_analyze_duration2 instead of deprecated
int max_analyze_duration.
2014-05-30 - xxxxxxx - lavu 52.89.100 - opt.h 2014-05-30 - xxxxxxx - lavu 52.89.100 - opt.h
Add av_opt_copy() Add av_opt_copy()
......
...@@ -1288,11 +1288,9 @@ typedef struct AVFormatContext { ...@@ -1288,11 +1288,9 @@ typedef struct AVFormatContext {
unsigned int probesize; unsigned int probesize;
/** /**
* Maximum duration (in AV_TIME_BASE units) of the data read * @deprecated deprecated in favor of max_analyze_duration2
* from input in avformat_find_stream_info().
* Demuxing only, set by the caller before avformat_find_stream_info().
* Can be set to 0 to let avformat choose using a heuristic.
*/ */
attribute_deprecated
int max_analyze_duration; int max_analyze_duration;
const uint8_t *key; const uint8_t *key;
...@@ -1649,6 +1647,15 @@ typedef struct AVFormatContext { ...@@ -1649,6 +1647,15 @@ typedef struct AVFormatContext {
* Muxing: set by user via AVOptions (NO direct access) * Muxing: set by user via AVOptions (NO direct access)
*/ */
int64_t output_ts_offset; int64_t output_ts_offset;
/**
* Maximum duration (in AV_TIME_BASE units) of the data read
* from input in avformat_find_stream_info().
* Demuxing only, set by the caller before avformat_find_stream_info()
* via AVOptions (NO direct access).
* Can be set to 0 to let avformat choose using a heuristic.
*/
int64_t max_analyze_duration2;
} AVFormatContext; } AVFormatContext;
int av_format_get_probe_score(const AVFormatContext *s); int av_format_get_probe_score(const AVFormatContext *s);
......
...@@ -53,7 +53,7 @@ static const AVOption avformat_options[] = { ...@@ -53,7 +53,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"}, {"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}, {"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" }, {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" },
{"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, D}, {"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},
{"cryptokey", "decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, {.dbl = 0}, 0, 0, D}, {"cryptokey", "decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, {.dbl = 0}, 0, 0, D},
{"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), AV_OPT_TYPE_INT, {.i64 = 1<<20 }, 0, INT_MAX, D}, {"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), AV_OPT_TYPE_INT, {.i64 = 1<<20 }, 0, INT_MAX, D},
{"rtbufsize", "max memory used for buffering real-time frames", OFFSET(max_picture_buffer), AV_OPT_TYPE_INT, {.i64 = 3041280 }, 0, INT_MAX, D}, /* defaults to 1s of 15fps 352x288 YUYV422 video */ {"rtbufsize", "max memory used for buffering real-time frames", OFFSET(max_picture_buffer), AV_OPT_TYPE_INT, {.i64 = 3041280 }, 0, INT_MAX, D}, /* defaults to 1s of 15fps 352x288 YUYV422 video */
......
...@@ -3095,7 +3095,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) ...@@ -3095,7 +3095,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
// new streams might appear, no options for those // new streams might appear, no options for those
int orig_nb_streams = ic->nb_streams; int orig_nb_streams = ic->nb_streams;
int flush_codecs = ic->probesize > 0; int flush_codecs = ic->probesize > 0;
int max_analyze_duration = ic->max_analyze_duration; int64_t max_analyze_duration = ic->max_analyze_duration2;
if (!max_analyze_duration)
max_analyze_duration = ic->max_analyze_duration;
if (!max_analyze_duration) { if (!max_analyze_duration) {
if (!strcmp(ic->iformat->name, "flv") && !(ic->ctx_flags & AVFMTCTX_NOHEADER)) { if (!strcmp(ic->iformat->name, "flv") && !(ic->ctx_flags & AVFMTCTX_NOHEADER)) {
...@@ -3318,7 +3320,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) ...@@ -3318,7 +3320,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
t = FFMAX(t, av_rescale_q(st->info->fps_last_dts - st->info->fps_first_dts, st->time_base, AV_TIME_BASE_Q)); t = FFMAX(t, av_rescale_q(st->info->fps_last_dts - st->info->fps_first_dts, st->time_base, AV_TIME_BASE_Q));
if (t >= max_analyze_duration) { if (t >= max_analyze_duration) {
av_log(ic, AV_LOG_VERBOSE, "max_analyze_duration %d reached at %"PRId64" microseconds\n", av_log(ic, AV_LOG_VERBOSE, "max_analyze_duration %"PRId64" reached at %"PRId64" microseconds\n",
max_analyze_duration, max_analyze_duration,
t); t);
break; break;
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVFORMAT_VERSION_MAJOR 55 #define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 42 #define LIBAVFORMAT_VERSION_MINOR 43
#define LIBAVFORMAT_VERSION_MICRO 101 #define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \ LIBAVFORMAT_VERSION_MINOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment