]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/bfi.c
asfdec: replace magic constant with DATA_HEADER_SIZE
[ffmpeg] / libavformat / bfi.c
index 647dd548947052410a5058f2f4e82ffbcf9ee1fe..e60bbf4cab5384279bb536af50fbdf6d86780a67 100644 (file)
  * @see http://wiki.multimedia.cx/index.php?title=BFI
  */
 
+#include "libavutil/channel_layout.h"
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
+#include "internal.h"
 
 typedef struct BFIContext {
     int nframes;
@@ -46,7 +48,7 @@ static int bfi_probe(AVProbeData * p)
         return 0;
 }
 
-static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap)
+static int bfi_read_header(AVFormatContext * s)
 {
     BFIContext *bfi = s->priv_data;
     AVIOContext *pb = s->pb;
@@ -86,20 +88,21 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap)
     astream->codec->sample_rate = avio_rl32(pb);
 
     /* Set up the video codec... */
-    av_set_pts_info(vstream, 32, 1, fps);
+    avpriv_set_pts_info(vstream, 32, 1, fps);
     vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    vstream->codec->codec_id   = CODEC_ID_BFI;
-    vstream->codec->pix_fmt    = PIX_FMT_PAL8;
+    vstream->codec->codec_id   = AV_CODEC_ID_BFI;
+    vstream->codec->pix_fmt    = AV_PIX_FMT_PAL8;
 
     /* Set up the audio codec now... */
     astream->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
-    astream->codec->codec_id        = CODEC_ID_PCM_U8;
+    astream->codec->codec_id        = AV_CODEC_ID_PCM_U8;
     astream->codec->channels        = 1;
+    astream->codec->channel_layout  = AV_CH_LAYOUT_MONO;
     astream->codec->bits_per_coded_sample = 8;
     astream->codec->bit_rate        =
         astream->codec->sample_rate * astream->codec->bits_per_coded_sample;
     avio_seek(pb, chunk_header - 3, SEEK_SET);
-    av_set_pts_info(astream, 64, 1, astream->codec->sample_rate);
+    avpriv_set_pts_info(astream, 64, 1, astream->codec->sample_rate);
     return 0;
 }