[FFmpeg-soc] [soc]: r562 - dvbmuxer/muxer_dev/mpegtsenc.c
realsun
subversion at mplayerhq.hu
Tue Jul 31 04:05:48 CEST 2007
Author: realsun
Date: Tue Jul 31 04:05:47 2007
New Revision: 562
Log:
add user supplied mux_rate
Modified:
dvbmuxer/muxer_dev/mpegtsenc.c
Modified: dvbmuxer/muxer_dev/mpegtsenc.c
==============================================================================
--- dvbmuxer/muxer_dev/mpegtsenc.c (original)
+++ dvbmuxer/muxer_dev/mpegtsenc.c Tue Jul 31 04:05:47 2007
@@ -460,12 +460,16 @@ static int mpegts_write_header(AVFormatC
bitrate += st->codec->bit_rate;
}
+ if(s->mux_rate) {
+ ts->mux_rate= (s->mux_rate + (8 * 50) - 1) / (8 * 50);
+ } else {
//bitrate += bitrate*5/100;
bitrate += bitrate * 25 / (8 * DEFAULT_PES_PAYLOAD_SIZE) + /* PES header size */
bitrate * 4 / (8 * TS_PACKET_SIZE) + /* TS header size */
500 * 12 + /* SDT size */
100 * 16; /* PAT size */
ts->mux_rate = bitrate;
+ }
ts->last_pcr = 10000; /* add a preload value */
service->pcr_packet_freq = (ts->mux_rate * PCR_RETRANS_TIME) /
More information about the FFmpeg-soc
mailing list