]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/adxdec.c
wrap_timestamp: remove unneeded check
[ffmpeg] / libavformat / adxdec.c
index 76b3728b1e7eb51fbf3350ece4fca0ac7b549be1..49e19307d5024db27bc767b41af2471aec007146 100644 (file)
@@ -26,6 +26,7 @@
 #include "libavutil/intreadwrite.h"
 #include "libavcodec/adx.h"
 #include "avformat.h"
+#include "internal.h"
 
 #define BLOCK_SIZE    18
 #define BLOCK_SAMPLES 32
@@ -61,7 +62,7 @@ static int adx_read_packet(AVFormatContext *s, AVPacket *pkt)
     return 0;
 }
 
-static int adx_read_header(AVFormatContext *s, AVFormatParameters *ap)
+static int adx_read_header(AVFormatContext *s)
 {
     ADXDemuxerContext *c = s->priv_data;
     AVCodecContext *avctx;
@@ -86,15 +87,16 @@ static int adx_read_header(AVFormatContext *s, AVFormatParameters *ap)
     }
     avctx->extradata_size = c->header_size;
 
-    ret = ff_adx_decode_header(avctx, avctx->extradata, avctx->extradata_size,
-                               &c->header_size, NULL);
+    ret = avpriv_adx_decode_header(avctx, avctx->extradata,
+                                   avctx->extradata_size, &c->header_size,
+                                   NULL);
     if (ret)
         return ret;
 
     st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
-    st->codec->codec_id    = s->iformat->value;
+    st->codec->codec_id    = s->iformat->raw_codec_id;
 
-    av_set_pts_info(st, 64, BLOCK_SAMPLES, avctx->sample_rate);
+    avpriv_set_pts_info(st, 64, BLOCK_SAMPLES, avctx->sample_rate);
 
     return 0;
 }
@@ -106,5 +108,6 @@ AVInputFormat ff_adx_demuxer = {
     .read_header    = adx_read_header,
     .read_packet    = adx_read_packet,
     .extensions     = "adx",
-    .value          = CODEC_ID_ADPCM_ADX,
+    .raw_codec_id   = AV_CODEC_ID_ADPCM_ADX,
+    .flags          = AVFMT_GENERIC_INDEX,
 };