aiffdec: set block duration for QDM2
authorPiotr Bandurski <ami_stuff@o2.pl>
Tue, 1 Jan 2013 16:57:01 +0000 (16:57 +0000)
committerPaul B Mahol <onemda@gmail.com>
Tue, 1 Jan 2013 17:03:22 +0000 (17:03 +0000)
Fixes #1697.

libavformat/aiffdec.c

index 79b7853..8d466fa 100644 (file)
@@ -280,8 +280,10 @@ static int aiff_read_header(AVFormatContext *s)
                 return AVERROR(ENOMEM);
             st->codec->extradata_size = size;
             avio_read(pb, st->codec->extradata, size);
-            if (st->codec->codec_id == AV_CODEC_ID_QDM2 && size>=12*4 && !st->codec->block_align)
+            if (st->codec->codec_id == AV_CODEC_ID_QDM2 && size>=12*4 && !st->codec->block_align) {
                 st->codec->block_align = AV_RB32(st->codec->extradata+11*4);
+                aiff->block_duration = AV_RB32(st->codec->extradata+9*4);
+            }
             break;
         case MKTAG('C','H','A','N'):
             if(ff_mov_read_chan(s, pb, st, size) < 0)