aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-13 22:14:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-14 00:32:00 +0100
commitc8d43c22dbb1c56a3e1f8f89e599a2f2a90ca110 (patch)
tree39a55e2d70d7758baf2515836292d97b7c6650b4
parentd9b7557732f1993cd84b6084516a6f78d1195889 (diff)
downloadffmpeg-c8d43c22dbb1c56a3e1f8f89e599a2f2a90ca110.tar.gz
avformat/utils/av_probe_input_buffer2: Fix pd.buf_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 6a2064820b52568c05a9ec8f418f18840e7c43cc) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index bcea353980..8854d5fc2e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -387,7 +387,8 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
score = 0;
ret = 0; /* error was end of file, nothing read */
}
- pd.buf_size = buf_offset += ret;
+ buf_offset += ret;
+ pd.buf_size = buf_offset - offset;
pd.buf = &buf[offset];
memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);