]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/qcp.c
build: fix standalone compilation of OMA muxer
[ffmpeg] / libavformat / qcp.c
index 635d531f44389b29267bf824dbafb23df2cdd0ed..191e9dd85b8461ab2e4c59f035ac57105c842a71 100644 (file)
@@ -23,7 +23,7 @@
  * @file
  * QCP format (.qcp) demuxer
  * @author Kenan Gillet
- * @sa RFC 3625: "The QCP File Format and Media Types for Speech Data"
+ * @see RFC 3625: "The QCP File Format and Media Types for Speech Data"
  *     http://tools.ietf.org/html/rfc3625
  */
 
@@ -84,7 +84,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
     AVIOContext *pb = s->pb;
     QCPContext    *c  = s->priv_data;
-    AVStream      *st = av_new_stream(s, 0);
+    AVStream      *st = avformat_new_stream(s, NULL);
     uint8_t       buf[16];
     int           i, nb_rates;
 
@@ -92,8 +92,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return AVERROR(ENOMEM);
 
     avio_rb32(pb);                    // "RIFF"
-    s->file_size = avio_rl32(pb) + 8;
-    avio_skip(pb, 8 + 4 + 1 + 1);    // "QLCMfmt " + chunk-size + major-version + minor-version
+    avio_skip(pb, 4 + 8 + 4 + 1 + 1);    // filesize + "QLCMfmt " + chunk-size + major-version + minor-version
 
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->channels   = 1;