diff options
Diffstat (limited to 'libavformat/psxstr.c')
-rw-r--r-- | libavformat/psxstr.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c index e1371c089e..8b6ecc88b4 100644 --- a/libavformat/psxstr.c +++ b/libavformat/psxstr.c @@ -171,11 +171,11 @@ static int str_read_packet(AVFormatContext *s, str->channels[channel].video_stream_index = st->index; - st->codec->codec_type = AVMEDIA_TYPE_VIDEO; - st->codec->codec_id = AV_CODEC_ID_MDEC; - st->codec->codec_tag = 0; /* no fourcc */ - st->codec->width = AV_RL16(§or[0x28]); - st->codec->height = AV_RL16(§or[0x2A]); + st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; + st->codecpar->codec_id = AV_CODEC_ID_MDEC; + st->codecpar->codec_tag = 0; /* no fourcc */ + st->codecpar->width = AV_RL16(§or[0x28]); + st->codecpar->height = AV_RL16(§or[0x2A]); } /* if this is the first sector of the frame, allocate a pkt */ @@ -219,22 +219,22 @@ static int str_read_packet(AVFormatContext *s, str->channels[channel].audio_stream_index = st->index; - st->codec->codec_type = AVMEDIA_TYPE_AUDIO; - st->codec->codec_id = AV_CODEC_ID_ADPCM_XA; - st->codec->codec_tag = 0; /* no fourcc */ + st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; + st->codecpar->codec_id = AV_CODEC_ID_ADPCM_XA; + st->codecpar->codec_tag = 0; /* no fourcc */ if (fmt & 1) { - st->codec->channels = 2; - st->codec->channel_layout = AV_CH_LAYOUT_STEREO; + st->codecpar->channels = 2; + st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO; } else { - st->codec->channels = 1; - st->codec->channel_layout = AV_CH_LAYOUT_MONO; + st->codecpar->channels = 1; + st->codecpar->channel_layout = AV_CH_LAYOUT_MONO; } - st->codec->sample_rate = (fmt&4)?18900:37800; - // st->codec->bit_rate = 0; //FIXME; - st->codec->block_align = 128; + st->codecpar->sample_rate = (fmt&4)?18900:37800; + // st->codecpar->bit_rate = 0; //FIXME; + st->codecpar->block_align = 128; - avpriv_set_pts_info(st, 64, 18 * 224 / st->codec->channels, - st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 18 * 224 / st->codecpar->channels, + st->codecpar->sample_rate); st->start_time = 0; } pkt = ret_pkt; |