diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-09-13 23:45:24 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-01-21 15:33:19 -0500 |
commit | 936f0d98f864f9f6bb4f9e5458b78537e146bacd (patch) | |
tree | bf3b42c3b14c40a2bdd3b3e06e267cae8345c992 /libavcodec/mpegvideo_enc.c | |
parent | d749615333084e62c9fcc480d1ae466369fdf14f (diff) | |
download | ffmpeg-936f0d98f864f9f6bb4f9e5458b78537e146bacd.tar.gz |
lavc: Move rtp_payload_size to codec private options
This option is only used by mpegvideoenc and openh264.
It is a very codec-specific option, so deprecate the global variant.
The openh264 option is dropped altogether since it is just a fallback
for -max_nal_size anyway.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index b032148c9e..fbbbb00990 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -294,6 +294,13 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) break; } +#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; @@ -313,7 +320,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; s->user_specified_pts = AV_NOPTS_VALUE; @@ -2766,7 +2773,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; |