diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-10-09 14:40:11 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-10-17 08:39:53 +0200 |
commit | 5a9ee3152b6e69166c7819f07a4992bd22052917 (patch) | |
tree | 418825014da0479d1049fa525c5ce6df6c24e9a5 /libavformat/mpegtsenc.c | |
parent | c10731e78b3ed89090b808b0919947f5729841c3 (diff) | |
download | ffmpeg-5a9ee3152b6e69166c7819f07a4992bd22052917.tar.gz |
mpegenc/mpegtsenc: add muxrate private options.
Deprecate AVFormatContext.mux_rate.
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 7347caab5e..d600d18b62 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -88,6 +88,7 @@ static const AVOption options[] = { offsetof(MpegTSWrite, pmt_start_pid), AV_OPT_TYPE_INT, {.dbl = 0x1000 }, 0x1000, 0x1f00, AV_OPT_FLAG_ENCODING_PARAM}, { "mpegts_start_pid", "Set the first pid.", offsetof(MpegTSWrite, start_pid), AV_OPT_TYPE_INT, {.dbl = 0x0100 }, 0x0100, 0x0f00, AV_OPT_FLAG_ENCODING_PARAM}, + { "muxrate", NULL, offsetof(MpegTSWrite, mux_rate), AV_OPT_TYPE_INT, {1}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, { NULL }, }; @@ -539,7 +540,10 @@ static int mpegts_write_header(AVFormatContext *s) service->pcr_pid = ts_st->pid; } - ts->mux_rate = s->mux_rate ? s->mux_rate : 1; +#if FF_API_MUXRATE + if (s->mux_rate) + ts->mux_rate = s->mux_rate; +#endif if (ts->mux_rate > 1) { service->pcr_packet_period = (ts->mux_rate * PCR_RETRANS_TIME) / |