]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/bmv.c
ogg: calculate the start position once all the headers are parsed
[ffmpeg] / libavformat / bmv.c
index fb41712868077db265d6a3651ecea381ca78e9e3..474f4e3bc39aba9f0dbeff70a3dad01dfd5e85ec 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "avformat.h"
+#include "internal.h"
 
 enum BMVFlags {
     BMV_NOP = 0,
@@ -37,7 +38,7 @@ typedef struct BMVContext {
     int64_t  audio_pos;
 } BMVContext;
 
-static int bmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
+static int bmv_read_header(AVFormatContext *s)
 {
     AVStream *st, *ast;
     BMVContext *c = s->priv_data;
@@ -46,19 +47,19 @@ static int bmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    st->codec->codec_id   = CODEC_ID_BMV_VIDEO;
+    st->codec->codec_id   = AV_CODEC_ID_BMV_VIDEO;
     st->codec->width      = 640;
     st->codec->height     = 429;
     st->codec->pix_fmt    = PIX_FMT_PAL8;
-    av_set_pts_info(st, 16, 1, 12);
+    avpriv_set_pts_info(st, 16, 1, 12);
     ast = avformat_new_stream(s, 0);
     if (!ast)
         return AVERROR(ENOMEM);
     ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
-    ast->codec->codec_id        = CODEC_ID_BMV_AUDIO;
+    ast->codec->codec_id        = AV_CODEC_ID_BMV_AUDIO;
     ast->codec->channels        = 2;
     ast->codec->sample_rate     = 22050;
-    av_set_pts_info(ast, 16, 1, 22050);
+    avpriv_set_pts_info(ast, 16, 1, 22050);
 
     c->get_next  = 1;
     c->audio_pos = 0;
@@ -132,5 +133,5 @@ AVInputFormat ff_bmv_demuxer = {
     .read_header    = bmv_read_header,
     .read_packet    = bmv_read_packet,
     .read_close     = bmv_read_close,
-    .extensions     = "bmv"
+    .extensions     = "bmv",
 };