]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rawdec.c
Combine deprecation guards where appropriate
[ffmpeg] / libavformat / rawdec.c
index 5f2a39801a09f11362f101ec985ff36e98486b3d..3b1bea642950fc4875601a25b3d92402cd552d11 100644 (file)
@@ -60,8 +60,8 @@ int ff_raw_audio_read_header(AVFormatContext *s)
     AVStream *st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-    st->codec->codec_id = s->iformat->raw_codec_id;
+    st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+    st->codecpar->codec_id = s->iformat->raw_codec_id;
     st->need_parsing = AVSTREAM_PARSE_FULL;
     st->start_time = 0;
     /* the parameters will be extracted from the compressed bitstream */
@@ -84,8 +84,8 @@ int ff_raw_video_read_header(AVFormatContext *s)
         goto fail;
     }
 
-    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    st->codec->codec_id = s->iformat->raw_codec_id;
+    st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+    st->codecpar->codec_id = s->iformat->raw_codec_id;
     st->need_parsing = AVSTREAM_PARSE_FULL;
 
     if ((ret = av_parse_video_rate(&framerate, s1->framerate)) < 0) {