diff options
author | Marton Balint <cus@passwd.hu> | 2012-07-19 01:23:20 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-01-14 18:13:22 +0100 |
commit | aa0cb16c15a5b30f78542f18e3fa65de005cf084 (patch) | |
tree | 29667604e3ba7e672a70f65863bc37cc6ab72046 /libavformat | |
parent | 42f9132218ca11a8e9a3c82a175b46bca092113e (diff) | |
download | ffmpeg-aa0cb16c15a5b30f78542f18e3fa65de005cf084.tar.gz |
mxf: Fix off by one error in d10 aes3 decoding
Without this fix the last sample was missing from the packet.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mxfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 37e1cfa446..3299e16528 100644 --- 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) |