]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/amr.c
cosmetics: indentation
[ffmpeg] / libavformat / amr.c
index b26afa71b7ced10bbb3b1d7f9c40fcb626d19dd6..96f559b227ee5d0fa4eaa525ba826eff928ec1c6 100644 (file)
@@ -26,6 +26,7 @@ Only mono files are supported.
 
 */
 #include "avformat.h"
+#include "internal.h"
 
 static const char AMR_header [] = "#!AMR\n";
 static const char AMRWB_header [] = "#!AMR-WB\n";
@@ -75,8 +76,7 @@ static int amr_probe(AVProbeData *p)
 }
 
 /* amr input */
-static int amr_read_header(AVFormatContext *s,
-                           AVFormatParameters *ap)
+static int amr_read_header(AVFormatContext *s)
 {
     AVIOContext *pb = s->pb;
     AVStream *st;
@@ -100,18 +100,16 @@ static int amr_read_header(AVFormatContext *s,
         st->codec->codec_tag = MKTAG('s', 'a', 'w', 'b');
         st->codec->codec_id = CODEC_ID_AMR_WB;
         st->codec->sample_rate = 16000;
-        st->codec->frame_size = 320;
     }
     else
     {
         st->codec->codec_tag = MKTAG('s', 'a', 'm', 'r');
         st->codec->codec_id = CODEC_ID_AMR_NB;
         st->codec->sample_rate = 8000;
-        st->codec->frame_size = 160;
     }
     st->codec->channels = 1;
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-    av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+    avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
 
     return 0;
 }
@@ -176,11 +174,10 @@ static int amr_read_packet(AVFormatContext *s,
 AVInputFormat ff_amr_demuxer = {
     .name           = "amr",
     .long_name      = NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
-    .priv_data_size = 0, /*priv_data_size*/
     .read_probe     = amr_probe,
     .read_header    = amr_read_header,
     .read_packet    = amr_read_packet,
-    .flags = AVFMT_GENERIC_INDEX,
+    .flags          = AVFMT_GENERIC_INDEX,
 };
 #endif