changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext...
[libav.git] / libavformat / idroq.c
index add882e..62536b0 100644 (file)
@@ -145,11 +145,11 @@ static int roq_read_header(AVFormatContext *s,
     /* set the pts reference (1 pts = 1/90000) */
     av_set_pts_info(st, 33, 1, 90000);
     roq->video_stream_index = st->index;
-    st->codec.codec_type = CODEC_TYPE_VIDEO;
-    st->codec.codec_id = CODEC_ID_ROQ;
-    st->codec.codec_tag = 0;  /* no fourcc */
-    st->codec.width = roq->width;
-    st->codec.height = roq->height;
+    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_id = CODEC_ID_ROQ;
+    st->codec->codec_tag = 0;  /* no fourcc */
+    st->codec->width = roq->width;
+    st->codec->height = roq->height;
 
     if (roq->audio_channels) {
         st = av_new_stream(s, 0);
@@ -157,15 +157,15 @@ static int roq_read_header(AVFormatContext *s,
             return AVERROR_NOMEM;
         av_set_pts_info(st, 33, 1, 90000);
         roq->audio_stream_index = st->index;
-        st->codec.codec_type = CODEC_TYPE_AUDIO;
-        st->codec.codec_id = CODEC_ID_ROQ_DPCM;
-        st->codec.codec_tag = 0;  /* no tag */
-        st->codec.channels = roq->audio_channels;
-        st->codec.sample_rate = RoQ_AUDIO_SAMPLE_RATE;
-        st->codec.bits_per_sample = 16;
-        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;
+        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_id = CODEC_ID_ROQ_DPCM;
+        st->codec->codec_tag = 0;  /* no tag */
+        st->codec->channels = roq->audio_channels;
+        st->codec->sample_rate = RoQ_AUDIO_SAMPLE_RATE;
+        st->codec->bits_per_sample = 16;
+        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;
     }
 
     return 0;