OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42f9132
)
mxf: Fix off by one error in d10 aes3 decoding
author
Marton Balint
<cus@passwd.hu>
Wed, 18 Jul 2012 23:23:20 +0000
(
01:23
+0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Tue, 14 Jan 2014 17:13:22 +0000
(18:13 +0100)
Without this fix the last sample was missing from the packet.
libavformat/mxfdec.c
patch
|
blob
|
history
diff --git
a/libavformat/mxfdec.c
b/libavformat/mxfdec.c
index
37e1cfa
..
3299e16
100644
(file)
--- a/
libavformat/mxfdec.c
+++ b/
libavformat/mxfdec.c
@@
-312,7
+312,7
@@
static int mxf_get_d10_aes3_packet(AVIOContext *pb, AVStream *st, AVPacket *pkt,
data_ptr = pkt->data;
end_ptr = pkt->data + length;
buf_ptr = pkt->data + 4; /* skip SMPTE 331M header */
- for (;
buf_ptr + st->codec->channels*4 < end_ptr
; ) {
+ for (;
end_ptr - buf_ptr >= st->codec->channels * 4
; ) {
for (i = 0; i < st->codec->channels; i++) {
uint32_t sample = bytestream_get_le32(&buf_ptr);
if (st->codec->bits_per_coded_sample == 24)