summaryrefslogtreecommitdiff
path: root/libavformat/mpegtsenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-18 01:33:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-18 01:54:40 +0200
commitfae714a9fbff876c4cacfe7d437c940d557b44ce (patch)
treea902e7f012153f96582d2eecdfb78def1c0260a1 /libavformat/mpegtsenc.c
parent9be937d38dac1ccf16fa8a7c0f9098bad5bb0431 (diff)
parent3ec344626c4ec2f515169f89bffe95dea92a5982 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: avconv: add presets rtsp: Expose the flag options via private AVOptions for sdp and rtp, too rtsp: Make the rtsp flags avoptions set via a define rtpenc: Set a default video codec avoptions: Fix av_opt_flag_is_set rtp: Fix ff_rtp_get_payload_type doc: Update the documentation on setting options for RTSP rtsp: Remove the separate filter_source variable rtsp: Accept options via private avoptions instead of URL options rtsp: Simplify AVOption definitions rtsp: Merge the AVOption lists lavfi: port libmpcodecs delogo filter lavfi: port boxblur filter from libmpcodecs lavfi: add negate filter lavfi: add LUT (LookUp Table) generic filters AVOptions: don't segfault on NULL parameter in av_set_options_string() avio: Check for invalid buffer length. mpegenc/mpegtsenc: add muxrate private options. lavf: deprecate AVFormatContext.file_size mov: add support for TV metadata atoms tves, tvsn and stik Conflicts: Changelog doc/filters.texi doc/protocols.texi libavfilter/Makefile libavfilter/allfilters.c libavfilter/avfilter.h libavfilter/formats.c libavfilter/internal.h libavfilter/vf_boxblur.c libavfilter/vf_delogo.c libavfilter/vf_lut.c libavformat/mpegtsenc.c libavformat/utils.c libavformat/version.h libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r--libavformat/mpegtsenc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 1173f69d78..1b00251b1c 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -92,6 +92,7 @@ static const AVOption options[] = {
{"mpegts_m2ts_mode", "Enable m2ts mode.",
offsetof(MpegTSWrite, m2ts_mode), AV_OPT_TYPE_INT, {.dbl = -1 },
-1,1, 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 },
};
@@ -562,7 +563,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) /