diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-07-03 19:01:59 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-07-09 13:37:18 +0000 |
commit | d5cf5afabbf43f00283e70b12afbe1da030d85b6 (patch) | |
tree | f90930aaee18f386ddc35928d9fcf8186382efd0 /libavformat | |
parent | f6ee61fb05482c617f5deee29a190d8ff483b3d1 (diff) | |
download | ffmpeg-streaming-d5cf5afabbf43f00283e70b12afbe1da030d85b6.zip ffmpeg-streaming-d5cf5afabbf43f00283e70b12afbe1da030d85b6.tar.gz |
adxdec: get rid of an avpriv function
The only thing the demuxer needs is the sample rate to set the timebase,
which can be simply read with AV_RB32.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/adxdec.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c index 49e1930..fc83ff2 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) @@ -87,11 +85,11 @@ static int adx_read_header(AVFormatContext *s) } avctx->extradata_size = c->header_size; - 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; |