mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 05:55:07 +00:00
lavf/mpegtsenc: Fix stream_type for low sample rate MP2/MP3.
This commit is contained in:
parent
a454ad670c
commit
fd0f1442eb
@ -318,7 +318,12 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
|
||||
break;
|
||||
case AV_CODEC_ID_MP2:
|
||||
case AV_CODEC_ID_MP3:
|
||||
stream_type = STREAM_TYPE_AUDIO_MPEG1;
|
||||
if ( st->codec->sample_rate > 0
|
||||
&& st->codec->sample_rate < 32000) {
|
||||
stream_type = STREAM_TYPE_AUDIO_MPEG2;
|
||||
} else {
|
||||
stream_type = STREAM_TYPE_AUDIO_MPEG1;
|
||||
}
|
||||
break;
|
||||
case AV_CODEC_ID_AAC:
|
||||
stream_type = (ts->flags & MPEGTS_FLAG_AAC_LATM)
|
||||
|
Loading…
Reference in New Issue
Block a user