History

Allow values >31bit for -analyzeduration.

Carl Eugen Hoyos committed 12 years ago

Commit 54827801 parent 2351ea85 files · +22 −9Browse files

Unified · Split

5 files
  1. doc/APIchanges +4 −0
  2. libavformat/avformat.h +11 −4
  3. libavformat/options_table.h +1 −1
  4. libavformat/utils.c +4 −2
  5. libavformat/version.h +2 −2
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2012-10-22 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2014-06-10 - xxxxxxx - lavf 55.43.100 - avformat.h
19+ New field int64_t max_analyze_duration2 instead of deprecated
20+ int max_analyze_duration.
21+
1822 2014-05-30 - xxxxxxx - lavu 52.89.100 - opt.h
1923 Add av_opt_copy()
2024
libavformat/avformat.h+11−4
@@ -1288,11 +1288,9 @@ typedef struct AVFormatContext { · 1287 unmodified lines
12881288 unsigned int probesize;
12891289
12901290 /**
1291− * Maximum duration (in AV_TIME_BASE units) of the data read
1292− * from input in avformat_find_stream_info().
1293− * Demuxing only, set by the caller before avformat_find_stream_info().
1294− * Can be set to 0 to let avformat choose using a heuristic.
1291+ * @deprecated deprecated in favor of max_analyze_duration2
12951292 */
1293+ attribute_deprecated
12961294 int max_analyze_duration;
12971295
12981296 const uint8_t *key;
@@ -1649,6 +1647,15 @@ typedef struct AVFormatContext { · 350 unmodified lines
16491647 * Muxing: set by user via AVOptions (NO direct access)
16501648 */
16511649 int64_t output_ts_offset;
1650+
1651+ /**
1652+ * Maximum duration (in AV_TIME_BASE units) of the data read
1653+ * from input in avformat_find_stream_info().
1654+ * Demuxing only, set by the caller before avformat_find_stream_info()
1655+ * via AVOptions (NO direct access).
1656+ * Can be set to 0 to let avformat choose using a heuristic.
1657+ */
1658+ int64_t max_analyze_duration2;
16521659 } AVFormatContext;
16531660
16541661 int av_format_get_probe_score(const AVFormatContext *s);
libavformat/options_table.h+1−1
@@ -53,7 +53,7 @@ static const AVOption avformat_options[] = { · 52 unmodified lines
5353 {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"},
5454 {"seek2any", "allow seeking to non-keyframes on demuxer level when supported", OFFSET(seek2any), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, D},
5555 {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" },
56−{"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},
56+{"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},
5757 {"cryptokey", "decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, {.dbl = 0}, 0, 0, D},
5858 {"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), AV_OPT_TYPE_INT, {.i64 = 1<<20 }, 0, INT_MAX, D},
5959 {"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 */
libavformat/utils.c+4−2
@@ -3095,7 +3095,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) · 3094 unmodified lines
30953095 // new streams might appear, no options for those
30963096 int orig_nb_streams = ic->nb_streams;
30973097 int flush_codecs = ic->probesize > 0;
3098− int max_analyze_duration = ic->max_analyze_duration;
3098+ int64_t max_analyze_duration = ic->max_analyze_duration2;
3099+ if (!max_analyze_duration)
3100+ max_analyze_duration = ic->max_analyze_duration;
30993101
31003102 if (!max_analyze_duration) {
31013103 if (!strcmp(ic->iformat->name, "flv") && !(ic->ctx_flags & AVFMTCTX_NOHEADER)) {
@@ -3317,7 +3319,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) · 215 unmodified lines
33173319 t = FFMAX(t, av_rescale_q(st->info->fps_last_dts - st->info->fps_first_dts, st->time_base, AV_TIME_BASE_Q));
33183320
33193321 if (t >= max_analyze_duration) {
3320− av_log(ic, AV_LOG_VERBOSE, "max_analyze_duration %d reached at %"PRId64" microseconds\n",
3322+ av_log(ic, AV_LOG_VERBOSE, "max_analyze_duration %"PRId64" reached at %"PRId64" microseconds\n",
33213323 max_analyze_duration,
33223324 t);
33233325 break;
libavformat/version.h+2−2
@@ -30,8 +30,8 @@ · 29 unmodified lines
3030 #include "libavutil/version.h"
3131
3232 #define LIBAVFORMAT_VERSION_MAJOR 55
33−#define LIBAVFORMAT_VERSION_MINOR 42
34−#define LIBAVFORMAT_VERSION_MICRO 101
33+#define LIBAVFORMAT_VERSION_MINOR 43
34+#define LIBAVFORMAT_VERSION_MICRO 100
3535
3636 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
3737 LIBAVFORMAT_VERSION_MINOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t