aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2014-07-30 11:09:25 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-07-30 11:09:25 +0200
commitff9a154157ecca30f585c5eb97f1cd600f500213 (patch)
tree288c681e55ec6bf6aadb69fa1345960a34fedd0a /libavformat/utils.c
parent355121bcb5d921c1e50b34a6f0b8da6a2c8a734f (diff)
downloadffmpeg-ff9a154157ecca30f585c5eb97f1cd600f500213.tar.gz
Add int64_t probesize2 instead of int probesize to AVFormatContext.
Allows to set a probesize >2G. Tested-by: Oliver Fromme
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4745060672..4cfebf23f9 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2950,10 +2950,15 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
int64_t old_offset = avio_tell(ic->pb);
// new streams might appear, no options for those
int orig_nb_streams = ic->nb_streams;
- int flush_codecs = ic->probesize > 0;
+ int flush_codecs;
int64_t max_analyze_duration = ic->max_analyze_duration2;
+ int64_t probesize = ic->probesize2;
+
if (!max_analyze_duration)
max_analyze_duration = ic->max_analyze_duration;
+ if (ic->probesize)
+ probesize = ic->probesize;
+ flush_codecs = probesize > 0;
av_opt_set(ic, "skip_clear", "1", AV_OPT_SEARCH_CHILDREN);
@@ -3081,10 +3086,10 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
}
}
/* We did not get all the codec info, but we read too much data. */
- if (read_size >= ic->probesize) {
+ if (read_size >= probesize) {
ret = count;
av_log(ic, AV_LOG_DEBUG,
- "Probe buffer size limit of %d bytes reached\n", ic->probesize);
+ "Probe buffer size limit of %"PRId64" bytes reached\n", probesize);
for (i = 0; i < ic->nb_streams; i++)
if (!ic->streams[i]->r_frame_rate.num &&
ic->streams[i]->info->duration_count <= 1 &&
@@ -3328,7 +3333,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
}
}
- if (ic->probesize)
+ if (probesize)
estimate_timings(ic, old_offset);
if (ret >= 0 && ic->nb_streams)