]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avr.c
lavfi: convert remaining input/output list compound literals to named objects.
[ffmpeg] / libavformat / avr.c
index 2527ed3db1f5ffcde630d22088ebcec18a527e2c..d3b23dbd59b10032d7cc7ec51566bdc081d0cc79 100644 (file)
@@ -23,6 +23,7 @@
 #include "avformat.h"
 #include "internal.h"
 #include "rawdec.h"
+#include "pcm.h"
 
 static int avr_probe(AVProbeData *p)
 {
@@ -61,8 +62,9 @@ static int avr_read_header(AVFormatContext *s)
 
     avio_skip(s->pb, 2); // loop
     avio_skip(s->pb, 2); // midi
+    avio_skip(s->pb, 1); // replay speed
 
-    st->codec->sample_rate = avio_rb32(s->pb);
+    st->codec->sample_rate = avio_rb24(s->pb);
     avio_skip(s->pb, 4 * 3);
     avio_skip(s->pb, 2 * 3);
     avio_skip(s->pb, 20);
@@ -87,9 +89,11 @@ static int avr_read_header(AVFormatContext *s)
 
 AVInputFormat ff_avr_demuxer = {
     .name           = "avr",
-    .long_name      = NULL_IF_CONFIG_SMALL("AVR (Audio Visual Resarch)"),
+    .long_name      = NULL_IF_CONFIG_SMALL("AVR (Audio Visual Research)"),
     .read_probe     = avr_probe,
     .read_header    = avr_read_header,
     .read_packet    = ff_raw_read_partial_packet,
+    .read_seek      = ff_pcm_read_seek,
     .extensions     = "avr",
+    .flags          = AVFMT_GENERIC_INDEX,
 };