X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmpegenc.c;h=dce1786b5e2774655de202290153066a592e8051;hb=8f0768cc22788357f603695b86f5e9013652bba6;hp=9e19a3d5e47ef3e60a5aa333db6390e50a09e825;hpb=8d4e44993a87a9b230c5c87cf892dd58adcebcc4;p=ffmpeg diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 9e19a3d5e47..dce1786b5e2 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -25,6 +25,7 @@ #include "libavutil/opt.h" #include "libavcodec/put_bits.h" #include "avformat.h" +#include "internal.h" #include "mpeg.h" #define MAX_PAYLOAD_SIZE 4096 @@ -336,7 +337,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) goto fail; st->priv_data = stream; - av_set_pts_info(st, 64, 1, 90000); + avpriv_set_pts_info(st, 64, 1, 90000); switch(st->codec->codec_type) { case AVMEDIA_TYPE_AUDIO: @@ -428,7 +429,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) if (!s->mux_rate) { /* we increase slightly the bitrate to take into account the headers. XXX: compute it exactly */ - bitrate += bitrate*5/100; + bitrate += bitrate / 20; bitrate += 10000; s->mux_rate = (bitrate + (8 * 50) - 1) / (8 * 50); }