avformat/mpegtsenc: fix usage of AVStream.codec
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
fc1c836def
commit
fe483ac428
@ -319,8 +319,8 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
|
|||||||
break;
|
break;
|
||||||
case AV_CODEC_ID_MP2:
|
case AV_CODEC_ID_MP2:
|
||||||
case AV_CODEC_ID_MP3:
|
case AV_CODEC_ID_MP3:
|
||||||
if ( st->codec->sample_rate > 0
|
if ( st->codecpar->sample_rate > 0
|
||||||
&& st->codec->sample_rate < 32000) {
|
&& st->codecpar->sample_rate < 32000) {
|
||||||
stream_type = STREAM_TYPE_AUDIO_MPEG2;
|
stream_type = STREAM_TYPE_AUDIO_MPEG2;
|
||||||
} else {
|
} else {
|
||||||
stream_type = STREAM_TYPE_AUDIO_MPEG1;
|
stream_type = STREAM_TYPE_AUDIO_MPEG1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user