aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2012-07-19 01:23:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-27 13:36:43 +0200
commit3be02afb56f2a485fcdc747b6c2f77ed03adc6e5 (patch)
treec34da95b08a96b8e126447103461187584580d2a
parentc49e0d2cdd8b91161f4b8c22b130ab4bd6e71b71 (diff)
downloadffmpeg-3be02afb56f2a485fcdc747b6c2f77ed03adc6e5.tar.gz
mxfdec: fix off by one error in d10 aes3 decoding
Without this fix the last sample was missing from the packet. Signed-off-by: Marton Balint <cus@passwd.hu> Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mxfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 00774ee0b3..d4f711af88 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -322,7 +322,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 (; buf_ptr + st->codec->channels*4 <= end_ptr; ) {
for (i = 0; i < st->codec->channels; i++) {
uint32_t sample = bytestream_get_le32(&buf_ptr);
if (st->codec->bits_per_coded_sample == 24)