Browse Source

avformat/mpegtsenc: Fix used service

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.1
Michael Niedermayer 10 years ago
parent
commit
26811fd946
2 changed files with 13 additions and 1 deletions
  1. +12
    -0
      libavformat/mpegtsenc.c
  2. +1
    -1
      libavformat/version.h

+ 12
- 0
libavformat/mpegtsenc.c View File

@@ -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. */


+ 1
- 1
libavformat/version.h View File

@@ -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, \


Loading…
Cancel
Save