[SCM] libav/experimental: set bps to uncompressed original sound data for compressed audio according to aiff specs, qt set it to 16 for mace and ima4, fail if block align is not set.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:15:32 UTC 2013
The following commit has been merged in the experimental branch:
commit e13c0783333a17ec2a14d6b283ea78cb506ec05d
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date: Mon Feb 25 12:00:31 2008 +0000
set bps to uncompressed original sound data for compressed audio
according to aiff specs, qt set it to 16 for mace and ima4,
fail if block align is not set.
Originally committed as revision 12198 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/aiff.c b/libavformat/aiff.c
index dede1d6..4a57464 100644
--- a/libavformat/aiff.c
+++ b/libavformat/aiff.c
@@ -189,7 +189,12 @@ static int aiff_write_header(AVFormatContext *s)
put_be32(pb, 0); /* file length */
put_tag(pb, aifc ? "AIFC" : "AIFF");
- if (aifc) {
+ if (aifc) { // compressed audio
+ enc->bits_per_sample = 16;
+ if (!enc->block_align) {
+ av_log(s, AV_LOG_ERROR, "block align not set\n");
+ return -1;
+ }
/* Version chunk */
put_tag(pb, "FVER");
put_be32(pb, 4);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list