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;
|
break;
|
||||||
case AV_CODEC_ID_MP2:
|
case AV_CODEC_ID_MP2:
|
||||||
case AV_CODEC_ID_MP3:
|
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;
|
break;
|
||||||
case AV_CODEC_ID_AAC:
|
case AV_CODEC_ID_AAC:
|
||||||
stream_type = (ts->flags & MPEGTS_FLAG_AAC_LATM)
|
stream_type = (ts->flags & MPEGTS_FLAG_AAC_LATM)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user