diff segafilm.c @ 820:feca73904e67 libavformat

changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
author michael
date Sun, 17 Jul 2005 22:24:36 +0000
parents c5077fdab490
children da1d5db0ce5c
line wrap: on
line diff
--- a/segafilm.c	Sun Jul 17 00:28:12 2005 +0000
+++ b/segafilm.c	Sun Jul 17 22:24:36 2005 +0000
@@ -140,11 +140,11 @@
         if (!st)
             return AVERROR_NOMEM;
         film->video_stream_index = st->index;
-        st->codec.codec_type = CODEC_TYPE_VIDEO;
-        st->codec.codec_id = film->video_type;
-        st->codec.codec_tag = 0;  /* no fourcc */
-        st->codec.width = BE_32(&scratch[16]);
-        st->codec.height = BE_32(&scratch[12]);
+        st->codec->codec_type = CODEC_TYPE_VIDEO;
+        st->codec->codec_id = film->video_type;
+        st->codec->codec_tag = 0;  /* no fourcc */
+        st->codec->width = BE_32(&scratch[16]);
+        st->codec->height = BE_32(&scratch[12]);
     }
 
     if (film->audio_type) {
@@ -152,16 +152,16 @@
         if (!st)
             return AVERROR_NOMEM;
         film->audio_stream_index = st->index;
-        st->codec.codec_type = CODEC_TYPE_AUDIO;
-        st->codec.codec_id = film->audio_type;
-        st->codec.codec_tag = 1;
-        st->codec.channels = film->audio_channels;
-        st->codec.bits_per_sample = film->audio_bits;
-        st->codec.sample_rate = film->audio_samplerate;
-        st->codec.bit_rate = st->codec.channels * st->codec.sample_rate *
-            st->codec.bits_per_sample;
-        st->codec.block_align = st->codec.channels * 
-            st->codec.bits_per_sample / 8;
+        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_id = film->audio_type;
+        st->codec->codec_tag = 1;
+        st->codec->channels = film->audio_channels;
+        st->codec->bits_per_sample = film->audio_bits;
+        st->codec->sample_rate = film->audio_samplerate;
+        st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
+            st->codec->bits_per_sample;
+        st->codec->block_align = st->codec->channels * 
+            st->codec->bits_per_sample / 8;
     }
 
     /* load the sample table */