]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tiertexseq.c
Ignore all generated example binaries
[ffmpeg] / libavformat / tiertexseq.c
index 194c83abc109946ae5f23ada43306374a405d443..8427f92145ad69d28c701463d28e1a455b1c4aa0 100644 (file)
@@ -24,6 +24,7 @@
  * Tiertex Limited SEQ file demuxer
  */
 
+#include "libavutil/channel_layout.h"
 #include "avformat.h"
 #include "internal.h"
 
@@ -213,27 +214,29 @@ static int seq_read_header(AVFormatContext *s)
 
     avpriv_set_pts_info(st, 32, 1, SEQ_FRAME_RATE);
     seq->video_stream_index = st->index;
-    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO;
-    st->codec->codec_tag = 0;  /* no fourcc */
-    st->codec->width = SEQ_FRAME_W;
-    st->codec->height = SEQ_FRAME_H;
+    st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+    st->codecpar->codec_id = AV_CODEC_ID_TIERTEXSEQVIDEO;
+    st->codecpar->codec_tag = 0;  /* no fourcc */
+    st->codecpar->width = SEQ_FRAME_W;
+    st->codecpar->height = SEQ_FRAME_H;
 
     /* initialize the audio decoder stream */
     st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
+    st->start_time = 0;
     avpriv_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE);
     seq->audio_stream_index = st->index;
-    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-    st->codec->codec_id = CODEC_ID_PCM_S16BE;
-    st->codec->codec_tag = 0;  /* no tag */
-    st->codec->channels = 1;
-    st->codec->sample_rate = SEQ_SAMPLE_RATE;
-    st->codec->bits_per_coded_sample = 16;
-    st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample * st->codec->channels;
-    st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
+    st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+    st->codecpar->codec_id = AV_CODEC_ID_PCM_S16BE;
+    st->codecpar->codec_tag = 0;  /* no tag */
+    st->codecpar->channels = 1;
+    st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
+    st->codecpar->sample_rate = SEQ_SAMPLE_RATE;
+    st->codecpar->bits_per_coded_sample = 16;
+    st->codecpar->bit_rate = st->codecpar->sample_rate * st->codecpar->bits_per_coded_sample * st->codecpar->channels;
+    st->codecpar->block_align = st->codecpar->channels * st->codecpar->bits_per_coded_sample / 8;
 
     return 0;
 }
@@ -305,7 +308,7 @@ static int seq_read_close(AVFormatContext *s)
 
 AVInputFormat ff_tiertexseq_demuxer = {
     .name           = "tiertexseq",
-    .long_name      = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ format"),
+    .long_name      = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ"),
     .priv_data_size = sizeof(SeqDemuxContext),
     .read_probe     = seq_probe,
     .read_header    = seq_read_header,