[FFmpeg-devel] [PATCH] mxfdec: fix off by one error in d10 aes3 decoding

Michael Niedermayer michaelni at gmx.at
Fri Jul 27 13:37:11 CEST 2012


On Wed, Jul 25, 2012 at 12:20:51PM +0200, Matthieu Bouron wrote:
> On Thu, Jul 19, 2012 at 01:23:20AM +0200, Marton Balint wrote:
> > Without this fix the last sample was missing from the packet.
> > 
> > Signed-off-by: Marton Balint <cus at passwd.hu>
> > ---
> >  libavformat/mxfdec.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> > index a553eb5..b5eb1ad 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)
> 
> Looks good to me.
> I also ran some test to check this patch and it seems good.

applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120727/b9ce26a6/attachment.asc>


More information about the ffmpeg-devel mailing list