]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/xmv.c
win32: Use 64-bit fstat/lseek variants for MSVC as well
[ffmpeg] / libavformat / xmv.c
index 30e3b5ade9791de4403878db72838d97b26b8b76..d638ad1ef4a26933f466088b6737fe35b7bfd555 100644 (file)
@@ -30,6 +30,7 @@
 #include "libavutil/intreadwrite.h"
 
 #include "avformat.h"
+#include "internal.h"
 #include "riff.h"
 
 #define XMV_MIN_HEADER_SIZE 36
@@ -52,7 +53,7 @@ typedef struct XMVAudioTrack {
     uint16_t block_align;
     uint16_t block_samples;
 
-    enum CodecID codec_id;
+    enum AVCodecID codec_id;
 } XMVAudioTrack;
 
 typedef struct XMVVideoPacket {
@@ -125,8 +126,7 @@ static int xmv_probe(AVProbeData *p)
     return 0;
 }
 
-static int xmv_read_header(AVFormatContext *s,
-                           AVFormatParameters *ap)
+static int xmv_read_header(AVFormatContext *s)
 {
     XMVDemuxContext *xmv = s->priv_data;
     AVIOContext     *pb  = s->pb;
@@ -145,7 +145,7 @@ static int xmv_read_header(AVFormatContext *s,
 
     file_version = avio_rl32(pb);
     if ((file_version != 4) && (file_version != 2))
-        av_log_ask_for_sample(s, "Found uncommon version %d\n", file_version);
+        avpriv_request_sample(s, "Uncommon version %d", file_version);
 
 
     /* Video track */
@@ -154,10 +154,10 @@ static int xmv_read_header(AVFormatContext *s,
     if (!vst)
         return AVERROR(ENOMEM);
 
-    av_set_pts_info(vst, 32, 1, 1000);
+    avpriv_set_pts_info(vst, 32, 1, 1000);
 
     vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    vst->codec->codec_id   = CODEC_ID_WMV2;
+    vst->codec->codec_id   = AV_CODEC_ID_WMV2;
     vst->codec->codec_tag  = MKBETAG('W', 'M', 'V', '2');
     vst->codec->width      = avio_rl32(pb);
     vst->codec->height     = avio_rl32(pb);
@@ -224,7 +224,7 @@ static int xmv_read_header(AVFormatContext *s,
         ast->codec->bit_rate              = track->bit_rate;
         ast->codec->block_align           = 36 * track->channels;
 
-        av_set_pts_info(ast, 32, track->block_samples, track->sample_rate);
+        avpriv_set_pts_info(ast, 32, track->block_samples, track->sample_rate);
 
         packet->stream_index = ast->index;
 
@@ -298,7 +298,7 @@ static int xmv_process_packet_header(AVFormatContext *s)
      * short for every audio track. But as playing around with XMV files with
      * ADPCM audio showed, taking the extra 4 bytes from the audio data gives
      * you either completely distorted audio or click (when skipping the
-     * remaining 68 bytes of the ADPCM block). Substracting 4 bytes for every
+     * remaining 68 bytes of the ADPCM block). Subtracting 4 bytes for every
      * audio track from the video data works at least for the audio. Probably
      * some alignment thing?
      * The video data has (always?) lots of padding, so it should work out...