summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpegtsenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index a1bd14c..b1bccd1 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -396,7 +396,7 @@ static MpegTSService *mpegts_add_service(MpegTSWrite *ts,
service = av_mallocz(sizeof(MpegTSService));
if (!service)
return NULL;
- service->pmt.pid = ts->pmt_start_pid + ts->nb_services;
+ service->pmt.pid = ts->pmt_start_pid + ts->nb_services - 1;
service->sid = sid;
service->provider_name = av_strdup(provider_name);
service->name = av_strdup(name);
OpenPOWER on IntegriCloud