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

Submitted by ffmpeg@a.legko.ru on June 28, 2017, 12:06 p.m.

Details

Message ID alpine.LNX.2.20.1706281502470.26976@scil.sinp.msu.ru
State New
Headers show

Commit Message

ffmpeg@a.legko.ru June 28, 2017, 12:06 p.m.
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.
From 79cb812cd708aa3d9d1a90eec6f42317b23ef05b Mon Sep 17 00:00:00 2001
From: root <ffmpeg@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(-)

-- 
2.7.4

Patch hide | download patch | download mbox

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);