aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-28 10:14:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-28 10:14:16 +0200
commit16310e36d9405b8d7d0da1273b03bec3adfec153 (patch)
treec7dde9eefbdf26af21e462868c91ec0e97644017 /libavformat
parent831e749bc926db2aea5f999529e176d18c832c82 (diff)
parent41f3c60fbb7420f41295c8e0cf80acf9e71f72d0 (diff)
downloadffmpeg-16310e36d9405b8d7d0da1273b03bec3adfec153.tar.gz
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master: Avoid a null pointer dereference in avcodec_decode_video2(). Set block_align when reading QDM2 in mov. Fix muxing QDM2 mono into caf. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/cafenc.c3
-rw-r--r--libavformat/mov.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index 11bb055965..cd3a0be907 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -86,8 +86,9 @@ static uint32_t samples_per_packet(enum AVCodecID codec_id, int channels) {
return 1152;
case AV_CODEC_ID_AC3:
return 1536;
- case AV_CODEC_ID_ALAC:
case AV_CODEC_ID_QDM2:
+ return 2048 * channels;
+ case AV_CODEC_ID_ALAC:
return 4096;
case AV_CODEC_ID_ADPCM_IMA_WAV:
return (1024 - 4 * channels) * 8 / (4 * channels) + 1;
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5c61f6c718..36b17c1710 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1551,6 +1551,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
case AV_CODEC_ID_ILBC:
case AV_CODEC_ID_MACE3:
case AV_CODEC_ID_MACE6:
+ case AV_CODEC_ID_QDM2:
st->codec->block_align = sc->bytes_per_frame;
break;
case AV_CODEC_ID_ALAC: