1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/mpegvideo_enc: workaround applications specifying intra dc level based on 8 and othes based on 0bit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-07-15 19:12:00 +02:00
parent 8a91cf857b
commit 97f86cd976

View File

@ -335,6 +335,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
s->mpeg_quant = avctx->mpeg_quant;
s->rtp_mode = !!avctx->rtp_payload_size;
s->intra_dc_precision = avctx->intra_dc_precision;
// workaround some differences between how applications specify dc precission
if (s->intra_dc_precision < 0) {
s->intra_dc_precision += 8;
} else if (s->intra_dc_precision >= 8)
s->intra_dc_precision -= 8;
s->user_specified_pts = AV_NOPTS_VALUE;
if (s->gop_size <= 1) {