[FFmpeg-devel] [PATCH 5/5] lavf/mpegtsenc: enable PGS split auto bsf

John Stebbins jstebbins at jetheaddev.com
Fri May 8 17:11:28 EEST 2020


PGS segments must be one per packet for muxing to m2ts
---
 libavformat/mpegtsenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index f2be6c6632..5b86dffd0e 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1984,6 +1984,8 @@ static int mpegts_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt
                               (st->codecpar->extradata_size > 0 &&
                                st->codecpar->extradata[0] == 1)))
             ret = ff_stream_add_bitstream_filter(st, "hevc_mp4toannexb", NULL);
+    } else if (st->codecpar->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE) {
+        ret = ff_stream_add_bitstream_filter(st, "pgs_frame_split", NULL);
     }
 
     return ret;
-- 
2.25.4



More information about the ffmpeg-devel mailing list