Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a2064820b52568c05a9ec8f418f18840e7c43cc)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -387,7 +387,8 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt, |
387 | 387 |
score = 0; |
388 | 388 |
ret = 0; /* error was end of file, nothing read */ |
389 | 389 |
} |
390 |
- pd.buf_size = buf_offset += ret; |
|
390 |
+ buf_offset += ret; |
|
391 |
+ pd.buf_size = buf_offset - offset; |
|
391 | 392 |
pd.buf = &buf[offset]; |
392 | 393 |
|
393 | 394 |
memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE); |