summaryrefslogtreecommitdiff
path: root/libavformat/adxdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-09 22:37:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-09 22:38:13 +0200
commite932ae5940562ae0a183687053a5457a76fd1fa9 (patch)
treed60f2db127f068f058a0b44adfeca3d580ba542a /libavformat/adxdec.c
parent1b58f1376132026a7633fea253f0ed67a8392343 (diff)
parentd5cf5afabbf43f00283e70b12afbe1da030d85b6 (diff)
downloadffmpeg-e932ae5940562ae0a183687053a5457a76fd1fa9.tar.gz
Merge commit 'd5cf5afabbf43f00283e70b12afbe1da030d85b6'
* commit 'd5cf5afabbf43f00283e70b12afbe1da030d85b6': adxdec: get rid of an avpriv function Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/adxdec.c')
-rw-r--r--libavformat/adxdec.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c
index fe22c3ae69..ddaa201179 100644
--- a/libavformat/adxdec.c
+++ b/libavformat/adxdec.c
@@ -24,7 +24,6 @@
*/
#include "libavutil/intreadwrite.h"
-#include "libavcodec/adx.h"
#include "avformat.h"
#include "internal.h"
@@ -66,7 +65,6 @@ static int adx_read_header(AVFormatContext *s)
{
ADXDemuxerContext *c = s->priv_data;
AVCodecContext *avctx;
- int ret;
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
@@ -81,11 +79,11 @@ static int adx_read_header(AVFormatContext *s)
if (ff_get_extradata(avctx, s->pb, c->header_size) < 0)
return AVERROR(ENOMEM);
- ret = avpriv_adx_decode_header(avctx, avctx->extradata,
- avctx->extradata_size, &c->header_size,
- NULL);
- if (ret)
- return ret;
+ if (avctx->extradata_size < 12) {
+ av_log(s, AV_LOG_ERROR, "Invalid extradata size.\n");
+ return AVERROR_INVALIDDATA;
+ }
+ avctx->sample_rate = AV_RB32(avctx->extradata + 8);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = s->iformat->raw_codec_id;