Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-03-23 04:58:52 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-03-24 14:35:19 +0300
commit26811fd9468dc484402faca3ca33cacb2e58c53e (patch)
treed22a25658fcd0e100cd9b9e14c42740c38245b4a /libavformat
parent50d017a28171177b89c367194ec8d02f963e7e9e (diff)
avformat/mpegtsenc: Fix used service
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpegtsenc.c12
-rw-r--r--libavformat/version.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 3e4e418cff..51677eaaf4 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -806,6 +806,7 @@ static int mpegts_init(AVFormatContext *s)
/* assign pids to each stream */
for (i = 0; i < s->nb_streams; i++) {
+ AVProgram *program;
st = s->streams[i];
ts_st = av_mallocz(sizeof(MpegTSWriteStream));
@@ -823,6 +824,17 @@ static int mpegts_init(AVFormatContext *s)
ret = AVERROR(ENOMEM);
goto fail;
}
+
+ program = av_find_program_from_stream(s, NULL, i);
+ if (program) {
+ for (j = 0; j < ts->nb_services; j++) {
+ if (ts->services[j]->program == program) {
+ service = ts->services[j];
+ break;
+ }
+ }
+ }
+
ts_st->service = service;
/* MPEG pid values < 16 are reserved. Applications which set st->id in
* this range are assigned a calculated pid. */
diff --git a/libavformat/version.h b/libavformat/version.h
index ed6b9237f8..42ab8f5cc4 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 57
#define LIBAVFORMAT_VERSION_MINOR 29
-#define LIBAVFORMAT_VERSION_MICRO 100
+#define LIBAVFORMAT_VERSION_MICRO 101
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \