diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-31 13:19:50 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-31 13:19:50 +0000 |
commit | 899e19f1776c607c126b291a7e0a614782f18f42 (patch) | |
tree | 50792a530d56f35fff93eab04e03c2b8a6b8ad95 /libavcodec/mpegvideo_enc.c | |
parent | 9938697c1c119a675759029ead74b91c529cdf2e (diff) | |
parent | 936f0d98f864f9f6bb4f9e5458b78537e146bacd (diff) | |
download | ffmpeg-899e19f1776c607c126b291a7e0a614782f18f42.tar.gz |
Merge commit '936f0d98f864f9f6bb4f9e5458b78537e146bacd'
* commit '936f0d98f864f9f6bb4f9e5458b78537e146bacd':
lavc: Move rtp_payload_size to codec private options
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index dd3b4c6642..fde3fd8cf9 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -348,6 +348,14 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) } avctx->bits_per_raw_sample = av_clip(avctx->bits_per_raw_sample, 0, 8); + +#if FF_API_PRIVATE_OPT +FF_DISABLE_DEPRECATION_WARNINGS + if (avctx->rtp_payload_size) + s->rtp_payload_size = avctx->rtp_payload_size; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + s->bit_rate = avctx->bit_rate; s->width = avctx->width; s->height = avctx->height; @@ -369,7 +377,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) s->codec_id = avctx->codec->id; s->strict_std_compliance = avctx->strict_std_compliance; s->quarter_sample = (avctx->flags & AV_CODEC_FLAG_QPEL) != 0; - s->rtp_mode = !!avctx->rtp_payload_size; + s->rtp_mode = !!s->rtp_payload_size; s->intra_dc_precision = avctx->intra_dc_precision; // workaround some differences between how applications specify dc precision @@ -3023,7 +3031,9 @@ static int encode_thread(AVCodecContext *c, void *arg){ current_packet_size= ((put_bits_count(&s->pb)+7)>>3) - (s->ptr_lastgob - s->pb.buf); - is_gob_start= s->avctx->rtp_payload_size && current_packet_size >= s->avctx->rtp_payload_size && mb_y + mb_x>0; + is_gob_start = s->rtp_payload_size && + current_packet_size >= s->rtp_payload_size && + mb_y + mb_x > 0; if(s->start_mb_y == mb_y && mb_y > 0 && mb_x==0) is_gob_start=1; |