Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-31 16:19:50 +0300
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-31 16:19:50 +0300
commit899e19f1776c607c126b291a7e0a614782f18f42 (patch)
tree50792a530d56f35fff93eab04e03c2b8a6b8ad95 /libavcodec/mpegvideo_enc.c
parent9938697c1c119a675759029ead74b91c529cdf2e (diff)
parent936f0d98f864f9f6bb4f9e5458b78537e146bacd (diff)
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.c14
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;