Commit fd0f1442 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavf/mpegtsenc: Fix stream_type for low sample rate MP2/MP3.

parent a454ad67
......@@ -318,7 +318,12 @@ 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) {
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)
......
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