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

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Mar 29 21:09:07 CEST 2016


On Tuesday 29 March 2016 05:37:02 pm Kieran Kunhya wrote:
> On Tue, 29 Mar 2016 at 15:32 Carl Eugen Hoyos wrote:
> >
> > Could attached maybe fix ticket #5388?
>
> The correct solution is to give "MP2" the MP1 stream_type and 
> "MP3" the MP2 stream_type.

As in attached?

Afaict, this is not what was requested in the ticket though.

Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 51677ea..6a623eb 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -317,9 +317,11 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
             stream_type = STREAM_TYPE_VIDEO_VC1;
             break;
         case AV_CODEC_ID_MP2:
-        case AV_CODEC_ID_MP3:
             stream_type = STREAM_TYPE_AUDIO_MPEG1;
             break;
+        case AV_CODEC_ID_MP3:
+            stream_type = STREAM_TYPE_AUDIO_MPEG2;
+            break;
         case AV_CODEC_ID_AAC:
             stream_type = (ts->flags & MPEGTS_FLAG_AAC_LATM)
                           ? STREAM_TYPE_AUDIO_AAC_LATM


More information about the ffmpeg-devel mailing list