summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-10 00:33:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-10 00:33:57 +0200
commit421c116fc498c2564823b96182c5baddcc0629b6 (patch)
tree397e7fec16d6d1a53ec2e3de67017678ab02d4c1 /libavformat
parent849d40dce62d125eb470cb549f98f32b71bb9730 (diff)
parentcf79f202757b0444f448fe472595ac140d7a3e77 (diff)
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master: Fix a typo in amr.c. Remove an unneeded include of avassert.h from amr.c. Do not allow writing invalid wav channel layouts by default. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/amr.c3
-rw-r--r--libavformat/riffenc.c4
-rw-r--r--libavformat/version.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/amr.c b/libavformat/amr.c
index db9bb4e59d..47c1244b1d 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -26,7 +26,6 @@ Only mono files are supported.
*/
-#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "avformat.h"
#include "internal.h"
@@ -116,7 +115,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(EIO);
}
- // FIXME this is wrong, this should rather be in a AVParset
+ // FIXME this is wrong, this should rather be in a AVParser
toc = avio_r8(s->pb);
mode = (toc >> 3) & 0x0F;
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c
index c3e3e66b37..6c91cb693a 100644
--- a/libavformat/riffenc.c
+++ b/libavformat/riffenc.c
@@ -172,12 +172,14 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
}
/* write WAVEFORMATEXTENSIBLE extensions */
if (waveformatextensible) {
+ int write_channel_mask = enc->strict_std_compliance < FF_COMPLIANCE_NORMAL ||
+ enc->channel_layout < 0x40000;
/* 22 is WAVEFORMATEXTENSIBLE size */
avio_wl16(pb, riff_extradata - riff_extradata_start + 22);
/* ValidBitsPerSample || SamplesPerBlock || Reserved */
avio_wl16(pb, bps);
/* dwChannelMask */
- avio_wl32(pb, enc->channel_layout);
+ avio_wl32(pb, write_channel_mask ? enc->channel_layout : 0);
/* GUID + next 3 */
if (enc->codec_id == AV_CODEC_ID_EAC3) {
ff_put_guid(pb, get_codec_guid(enc->codec_id, ff_codec_wav_guids));
diff --git a/libavformat/version.h b/libavformat/version.h
index fe54380304..3d2bb6d008 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 36
-#define LIBAVFORMAT_VERSION_MICRO 102
+#define LIBAVFORMAT_VERSION_MICRO 103
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \