[FFmpeg-devel] patch 2. Adding missing options, required for mpegts encoder.

ffmpeg at a.legko.ru ffmpeg at a.legko.ru
Wed Jun 28 15:06:10 EEST 2017


subject: some options, present in libavformat/mpegtsenc.c were not present 
in ffmpeg_ops.c, thus filling some values in mpeg ts with default values. 
it is not good for ts itself and breaks mutltiprog/multistream  mode.
-------------- next part --------------
From 79cb812cd708aa3d9d1a90eec6f42317b23ef05b Mon Sep 17 00:00:00 2001
From: root <ffmpeg at scil.sinp.msu.ru>
Date: Wed, 28 Jun 2017 14:55:08 +0300
Subject: [PATCH 2/3] add support for missing options, required by
 libavformat/mpegtsenc.c and present there, but never defined

---
 ffmpeg_opt.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index bb6001f..aa4ffb5 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -2653,13 +2653,18 @@ loop_end:
             if (!*p2)
                 exit_program(1);
             p2++;
-
             if (!strcmp(key, "title")) {
                 av_dict_set(&program->metadata, "title", p2, 0);
             } else if (!strcmp(key, "program_num")) {
             } else if (!strcmp(key, "st")) {
                 int st_num = strtol(p2, NULL, 0);
                 av_program_add_stream_index(oc, progid, st_num);
+            } else if (!strcmp(key, "service_provider")) {
+                av_dict_set(&program->metadata, "service_provider", p2, 0);
+            } else if (!strcmp(key, "service_name")) {
+                av_dict_set(&program->metadata, "service_name", p2, 0);
+            } else if (!strcmp(key, "pcr_pid")) {
+                av_dict_set(&program->metadata, "pcr_pid", p2, 0);
             } else {
                 av_log(NULL, AV_LOG_FATAL, "Unknown program key %s.\n", key);
                 exit_program(1);
-- 
2.7.4



More information about the ffmpeg-devel mailing list