[FFmpeg-cvslog] libavformat: Use AVFormatContext.probesize in init_input
Martin Storsjö
git at videolan.org
Tue Mar 20 00:16:53 CET 2012
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Mon Mar 19 14:24:04 2012 +0200| [57151f8674f73445c5cf82b7c80e3a98b3baed33] | committer: Martin Storsjö
libavformat: Use AVFormatContext.probesize in init_input
This was forgotten in the transition from av_open_input_file to
avformat_open_input, see 603b8bc2a1.
This doesn't change anything for the default case where the
option isn't set, since PROBE_BUF_MAX is 1048576 (which was
used as max probe size earlier) while the default value for
the probesize option is 5000000, which for the probe function
is clipped to PROBE_BUF_MAX anyway.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57151f8674f73445c5cf82b7c80e3a98b3baed33
---
libavformat/utils.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c91a0dc..f67d2d4 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -480,7 +480,7 @@ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **o
if (s->pb) {
s->flags |= AVFMT_FLAG_CUSTOM_IO;
if (!s->iformat)
- return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0);
+ return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, s->probesize);
else if (s->iformat->flags & AVFMT_NOFILE)
return AVERROR(EINVAL);
return 0;
@@ -495,7 +495,7 @@ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **o
return ret;
if (s->iformat)
return 0;
- return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0);
+ return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, s->probesize);
}
static AVPacket *add_to_pktbuf(AVPacketList **packet_buffer, AVPacket *pkt,
More information about the ffmpeg-cvslog
mailing list