aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Sommer <saschasommer@freenet.de>2011-02-06 13:54:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-02-09 03:30:01 +0100
commite11afd71a37316e2ea4e765dcb7a6a72867d9bc8 (patch)
treefac98c1dfbc3bab4edc53bfcde8b2e5a342eedb1
parent5fb06ffac7af5a8c6f21e6d0a2dd8c938fdde3f8 (diff)
downloadffmpeg-e11afd71a37316e2ea4e765dcb7a6a72867d9bc8.tar.gz
pass QDMC extradata to the decoder
Makes playing QDMC files in MPlayer work when using the libavformat demuxer. Problem was that the extradata was not passed from demuxer to decoder. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit ed19fafd486d6ab0d6e1eba80ceaa482a740c556)
-rw-r--r--libavcodec/avcodec.h1
-rw-r--r--libavformat/isom.c1
-rw-r--r--libavformat/mov.c4
3 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f96ae84740..aa5fa0a9ef 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -389,6 +389,7 @@ enum CodecID {
CODEC_ID_BINKAUDIO_RDFT,
CODEC_ID_BINKAUDIO_DCT,
CODEC_ID_AAC_LATM,
+ CODEC_ID_QDMC,
/* subtitle codecs */
CODEC_ID_DVD_SUBTITLE= 0x17000,
diff --git a/libavformat/isom.c b/libavformat/isom.c
index 89b352c75d..88d68258b8 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -249,6 +249,7 @@ const AVCodecTag codec_movaudio_tags[] = {
{ CODEC_ID_QCELP, MKTAG('Q','c','l','q') },
{ CODEC_ID_QCELP, MKTAG('s','q','c','p') }, /* ISO Media fourcc */
+ { CODEC_ID_QDMC, MKTAG('Q', 'D', 'M', 'C') }, /* QDMC */
{ CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2') }, /* QDM2 */
{ CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') },
diff --git a/libavformat/mov.c b/libavformat/mov.c
index a48000fe52..310a399d83 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -769,8 +769,8 @@ static int mov_read_wave(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
if((uint64_t)atom.size > (1<<30))
return -1;
- if (st->codec->codec_id == CODEC_ID_QDM2) {
- // pass all frma atom to codec, needed at least for QDM2
+ if (st->codec->codec_id == CODEC_ID_QDM2 || st->codec->codec_id == CODEC_ID_QDMC) {
+ // pass all frma atom to codec, needed at least for QDMC and QDM2
av_free(st->codec->extradata);
st->codec->extradata = av_mallocz(atom.size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)