]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/bethsoftvid.c
win32: Use 64-bit fstat/lseek variants for MSVC as well
[ffmpeg] / libavformat / bethsoftvid.c
index ece230ccb7ee83129fabba598aa69ab9f911ce40..120e145a76e5f4f6fe6866bad431a30eee8e8c1b 100644 (file)
@@ -27,6 +27,7 @@
  * @see http://www.svatopluk.com/andux/docs/dfvid.html
  */
 
+#include "libavutil/channel_layout.h"
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
 #include "internal.h"
@@ -56,7 +57,7 @@ typedef struct BVID_DemuxContext
 
 static int vid_probe(AVProbeData *p)
 {
-    // little endian VID tag, file starts with "VID\0"
+    // little-endian VID tag, file starts with "VID\0"
     if (AV_RL32(p->buf) != MKTAG('V', 'I', 'D', 0))
         return 0;
 
@@ -107,8 +108,9 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt,
             return AVERROR(ENOMEM);
         vid->video_index = st->index;
         if (vid->audio_index < 0) {
-            av_log_ask_for_sample(s, "No audio packet before first video "
-                                  "packet. Using default video time base.\n");
+            avpriv_request_sample(s, "Using default video time base since "
+                                  "having no audio packet before the first "
+                                  "video packet");
         }
         avpriv_set_pts_info(st, 64, 185, vid->sample_rate);
         st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
@@ -239,6 +241,7 @@ static int vid_read_packet(AVFormatContext *s,
                 st->codec->codec_type            = AVMEDIA_TYPE_AUDIO;
                 st->codec->codec_id              = AV_CODEC_ID_PCM_U8;
                 st->codec->channels              = 1;
+                st->codec->channel_layout        = AV_CH_LAYOUT_MONO;
                 st->codec->bits_per_coded_sample = 8;
                 st->codec->sample_rate           = vid->sample_rate;
                 st->codec->bit_rate              = 8 * st->codec->sample_rate;