Commit fe483ac4 authored by James Almer's avatar James Almer

avformat/mpegtsenc: fix usage of AVStream.codec

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent fc1c836d
......@@ -319,8 +319,8 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
break;
case AV_CODEC_ID_MP2:
case AV_CODEC_ID_MP3:
if ( st->codec->sample_rate > 0
&& st->codec->sample_rate < 32000) {
if ( st->codecpar->sample_rate > 0
&& st->codecpar->sample_rate < 32000) {
stream_type = STREAM_TYPE_AUDIO_MPEG2;
} else {
stream_type = STREAM_TYPE_AUDIO_MPEG1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment