[FFmpeg-devel] [PATCH]lavf/mpegtsenc: Allow DVB stream_type for mp2 audio

James Almer jamrial at gmail.com
Tue May 3 21:45:49 CEST 2016


On 3/30/2016 6:23 AM, Carl Eugen Hoyos wrote:
> On Tuesday 29 March 2016 04:31:53 pm Carl Eugen Hoyos wrote:
>> > Hi!
>> >
>> > Could attached maybe fix ticket #5388?
> New patch attached that should improve conformance.
> 
> Please comment, Carl Eugen
> 
> 
> patchmpegtsmpeg.diff
> 
> 
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index 51677ea..29bccb5 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -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) {

This should be st->codecpar



More information about the ffmpeg-devel mailing list