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

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Mar 29 16:31:53 CEST 2016


Hi!

Could attached maybe fix ticket #5388?

Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 51677ea..e226cfa 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -318,7 +318,9 @@ 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;
+            stream_type = (ts->flags & MPEGTS_FLAG_SYSTEM_B)
+                          ? STREAM_TYPE_AUDIO_MPEG2
+                          : STREAM_TYPE_AUDIO_MPEG1;
             break;
         case AV_CODEC_ID_AAC:
             stream_type = (ts->flags & MPEGTS_FLAG_AAC_LATM)


More information about the ffmpeg-devel mailing list