[FFmpeg-cvslog] avformat/mpegtsenc: set stream_id correctly based on KLV profile selected

Brad Hards git at videolan.org
Sun May 31 22:18:56 EEST 2020


ffmpeg | branch: master | Brad Hards <bradh at frogmouth.net> | Wed May 27 20:02:00 2020 +1000| [b8d6d9376c4745de3b85c6a2a1faf7a0e0a19879] | committer: Marton Balint

avformat/mpegtsenc: set stream_id correctly based on KLV profile selected

Previously we always set STREAM_TYPE_PRIVATE_DATA, and that remains
the default value.

Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b8d6d9376c4745de3b85c6a2a1faf7a0e0a19879
---

 libavformat/mpegtsenc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index ffa60f7f74..b5ee48d015 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -353,6 +353,13 @@ static int get_dvb_stream_type(AVFormatContext *s, AVStream *st)
     case AV_CODEC_ID_DVB_TELETEXT:
         stream_type = STREAM_TYPE_PRIVATE_DATA;
         break;
+    case AV_CODEC_ID_SMPTE_KLV:
+        if (st->codecpar->profile == FF_PROFILE_KLVA_SYNC) {
+            stream_type = STREAM_TYPE_METADATA;
+        } else {
+            stream_type = STREAM_TYPE_PRIVATE_DATA;
+        }
+        break;
     default:
         av_log_once(s, AV_LOG_WARNING, AV_LOG_DEBUG, &ts_st->data_st_warning,
                     "Stream %d, codec %s, is muxed as a private data stream "



More information about the ffmpeg-cvslog mailing list