---
 libavformat/swfdec.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 7b5cd35..7bb67de 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -173,7 +173,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket 
*pkt)
 
             for (i=0; i<s->nb_streams; i++) {
                 st = s->streams[i];
-                if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == 
ch_id)
+                if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && st->id 
== ch_id)
                     goto skip;
             }
 
@@ -186,8 +186,8 @@ static int swf_read_packet(AVFormatContext *s, AVPacket 
*pkt)
             if (!vst)
                 return -1;
             vst->id = ch_id;
-            vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-            vst->codec->codec_id = ff_codec_get_id(ff_swf_codec_tags, 
avio_r8(pb));
+            vst->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+            vst->codecpar->codec_id = ff_codec_get_id(ff_swf_codec_tags, 
avio_r8(pb));
             avpriv_set_pts_info(vst, 16, 256, swf->frame_rate);
             len -= 8;
         } else if (tag == TAG_STREAMHEAD || tag == TAG_STREAMHEAD2) {
@@ -196,7 +196,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket 
*pkt)
 
             for (i=0; i<s->nb_streams; i++) {
                 st = s->streams[i];
-                if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == 
-1)
+                if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && st->id 
== -1)
                     goto skip;
             }
 
@@ -208,25 +208,25 @@ static int swf_read_packet(AVFormatContext *s, AVPacket 
*pkt)
                 return -1;
             ast->id = -1; /* -1 to avoid clash with video stream ch_id */
             if (v & 1) {
-                ast->codec->channels       = 2;
-                ast->codec->channel_layout = AV_CH_LAYOUT_STEREO;
+                ast->codecpar->channels       = 2;
+                ast->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
             } else {
-                ast->codec->channels       = 1;
-                ast->codec->channel_layout = AV_CH_LAYOUT_MONO;
+                ast->codecpar->channels       = 1;
+                ast->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
             }
-            ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-            ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, 
(v>>4) & 15);
+            ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+            ast->codecpar->codec_id = ff_codec_get_id(swf_audio_codec_tags, 
(v>>4) & 15);
             ast->need_parsing = AVSTREAM_PARSE_FULL;
             sample_rate_code= (v>>2) & 3;
-            ast->codec->sample_rate = 44100 >> (3 - sample_rate_code);
-            avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
+            ast->codecpar->sample_rate = 44100 >> (3 - sample_rate_code);
+            avpriv_set_pts_info(ast, 64, 1, ast->codecpar->sample_rate);
             len -= 4;
         } else if (tag == TAG_VIDEOFRAME) {
             int ch_id = avio_rl16(pb);
             len -= 2;
             for(i=0; i<s->nb_streams; i++) {
                 st = s->streams[i];
-                if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == 
ch_id) {
+                if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && st->id 
== ch_id) {
                     frame = avio_rl16(pb);
                     len -= 2;
                     if (len <= 0)
@@ -242,8 +242,8 @@ static int swf_read_packet(AVFormatContext *s, AVPacket 
*pkt)
         } else if (tag == TAG_STREAMBLOCK) {
             for (i = 0; i < s->nb_streams; i++) {
                 st = s->streams[i];
-                if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == 
-1) {
-                    if (st->codec->codec_id == AV_CODEC_ID_MP3) {
+                if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && st->id 
== -1) {
+                    if (st->codecpar->codec_id == AV_CODEC_ID_MP3) {
                         avio_skip(pb, 4);
                         len -= 4;
                         if (len <= 0)
@@ -264,7 +264,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket 
*pkt)
         } else if (tag == TAG_JPEG2) {
             for (i=0; i<s->nb_streams; i++) {
                 st = s->streams[i];
-                if (st->codec->codec_id == AV_CODEC_ID_MJPEG && st->id == -2)
+                if (st->codecpar->codec_id == AV_CODEC_ID_MJPEG && st->id == 
-2)
                     break;
             }
             if (i == s->nb_streams) {
@@ -272,8 +272,8 @@ static int swf_read_packet(AVFormatContext *s, AVPacket 
*pkt)
                 if (!vst)
                     return -1;
                 vst->id = -2; /* -2 to avoid clash with video stream and audio 
stream */
-                vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-                vst->codec->codec_id = AV_CODEC_ID_MJPEG;
+                vst->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+                vst->codecpar->codec_id = AV_CODEC_ID_MJPEG;
                 avpriv_set_pts_info(vst, 64, 256, swf->frame_rate);
                 st = vst;
             }
-- 
2.0.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to