diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c
index 51ab7ea..a51fbe2 100644
|
a
|
b
|
static av_cold int libspeex_decode_init(AVCodecContext *avctx) |
| 50 | 50 | if (!header) |
| 51 | 51 | av_log(avctx, AV_LOG_WARNING, "Invalid Speex header\n"); |
| 52 | 52 | } |
| 53 | | if (header) { |
| | 53 | |
| | 54 | if (avctx->codec_tag == MKTAG('S', 'P', 'X', 'N')) { |
| | 55 | if (!avctx->extradata || avctx->extradata && avctx->extradata_size < 47) { |
| | 56 | av_log(avctx, AV_LOG_ERROR, "Missing or invalid extradata.\n"); |
| | 57 | return AVERROR_INVALIDDATA; |
| | 58 | } |
| | 59 | if (avctx->extradata[37] != 10) { |
| | 60 | av_log(avctx, AV_LOG_ERROR, "Unsupported compression mode.\n"); |
| | 61 | return AVERROR_PATCHWELCOME; |
| | 62 | } |
| | 63 | avctx->channels = 1; |
| | 64 | spx_mode = 0; |
| | 65 | } else if (header) { |
| 54 | 66 | avctx->channels = header->nb_channels; |
| 55 | 67 | spx_mode = header->mode; |
| 56 | 68 | speex_header_free(header); |
| … |
… |
static av_cold int libspeex_decode_init(AVCodecContext *avctx) |
| 73 | 85 | av_log(avctx, AV_LOG_ERROR, "Unknown Speex mode %d", spx_mode); |
| 74 | 86 | return AVERROR_INVALIDDATA; |
| 75 | 87 | } |
| | 88 | if (avctx->codec_tag != MKTAG('S', 'P', 'X', 'N')) |
| 76 | 89 | avctx->sample_rate = 8000 << spx_mode; |
| 77 | 90 | s->frame_size = 160 << spx_mode; |
| 78 | 91 | |
diff --git a/libavformat/isom.c b/libavformat/isom.c
index 3271056..813a018 100644
|
a
|
b
|
const AVCodecTag ff_codec_movaudio_tags[] = { |
| 292 | 292 | { AV_CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2') }, |
| 293 | 293 | { AV_CODEC_ID_QDMC, MKTAG('Q', 'D', 'M', 'C') }, |
| 294 | 294 | { AV_CODEC_ID_SPEEX, MKTAG('s', 'p', 'e', 'x') }, /* Flash Media Server */ |
| | 295 | { AV_CODEC_ID_SPEEX, MKTAG('S', 'P', 'X', 'N') }, |
| 295 | 296 | { AV_CODEC_ID_WMAV2, MKTAG('W', 'M', 'A', '2') }, |
| 296 | 297 | { AV_CODEC_ID_NONE, 0 }, |
| 297 | 298 | }; |
diff --git a/libavformat/mov.c b/libavformat/mov.c
index d7d7f21..bcf44de 100644
|
a
|
b
|
static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom) |
| 1010 | 1010 | if ((uint64_t)atom.size > (1<<30)) |
| 1011 | 1011 | return AVERROR_INVALIDDATA; |
| 1012 | 1012 | |
| 1013 | | if (st->codec->codec_id == AV_CODEC_ID_QDM2 || st->codec->codec_id == AV_CODEC_ID_QDMC) { |
| | 1013 | if (st->codec->codec_id == AV_CODEC_ID_QDM2 || st->codec->codec_id == AV_CODEC_ID_QDMC || st->codec->codec_id == AV_CODEC_ID_SPEEX) { |
| 1014 | 1014 | // pass all frma atom to codec, needed at least for QDMC and QDM2 |
| 1015 | 1015 | av_free(st->codec->extradata); |
| 1016 | 1016 | st->codec->extradata_size = 0; |