]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/wv.c
Change sign in ff_celp_lp_synthesis_filterf(). This makes this function
[ffmpeg] / libavformat / wv.c
index 2240dfde2db0a52928a45c9e6ede514887503823..1dda1fdaa20d22a7641bf6744dd6dcf36da3f09d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * WavPack demuxer
- * Copyright (c) 2006 Konstantin Shishkov.
+ * Copyright (c) 2006 Konstantin Shishkov
  *
  * This file is part of FFmpeg.
  *
@@ -19,8 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/intreadwrite.h"
 #include "avformat.h"
-#include "bswap.h"
 
 // specs say that maximum block size is 1Mb
 #define WV_BLOCK_LIMIT 1047576
@@ -100,10 +100,6 @@ static int wv_read_block_header(AVFormatContext *ctx, ByteIOContext *pb)
         av_log(ctx, AV_LOG_ERROR, "Floating point data is not supported\n");
         return -1;
     }
-    if(wc->flags & WV_HYBRID){
-        av_log(ctx, AV_LOG_ERROR, "Hybrid coding mode is not supported\n");
-        return -1;
-    }
 
     bpp = ((wc->flags & 3) + 1) << 3;
     chan = 1 + !(wc->flags & WV_MONO);
@@ -151,7 +147,7 @@ static int wv_read_header(AVFormatContext *s,
     st->codec->codec_id = CODEC_ID_WAVPACK;
     st->codec->channels = wc->chan;
     st->codec->sample_rate = wc->rate;
-    st->codec->bits_per_sample = wc->bpp;
+    st->codec->bits_per_coded_sample = wc->bpp;
     av_set_pts_info(st, 64, 1, wc->rate);
     s->start_time = 0;
     s->duration = (int64_t)wc->samples * AV_TIME_BASE / st->codec->sample_rate;
@@ -187,11 +183,6 @@ static int wv_read_packet(AVFormatContext *s,
     return 0;
 }
 
-static int wv_read_close(AVFormatContext *s)
-{
-    return 0;
-}
-
 static int wv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 {
     AVStream *st = s->streams[stream_index];
@@ -226,11 +217,11 @@ static int wv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
 
 AVInputFormat wv_demuxer = {
     "wv",
-    "WavPack",
+    NULL_IF_CONFIG_SMALL("WavPack"),
     sizeof(WVContext),
     wv_probe,
     wv_read_header,
     wv_read_packet,
-    wv_read_close,
+    NULL,
     wv_read_seek,
 };