aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-03-16 20:13:44 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-03-18 02:21:23 +0100
commit12e4aefb80f42f8f5da7cdf558314854b6fdef02 (patch)
tree48c5d0a75a66fe05dfa528489b15a2d49dfc9e7b
parent85e082d08180ae1abfb63ddf0e09795def881316 (diff)
downloadffmpeg-12e4aefb80f42f8f5da7cdf558314854b6fdef02.tar.gz
Do not (re-)set libx264 parameter b_tff if interlaced encoding was not requested.
Reconfiguring can break x264 lossless encoding. Fixes ticket #2165. (cherry picked from commit 75c7e4583f4fd727d236a12763a265502fe00988)
-rw-r--r--libavcodec/libx264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index f6cd9fa3a5..a82cb2480f 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -174,7 +174,7 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
frame->pict_type == AV_PICTURE_TYPE_P ? X264_TYPE_P :
frame->pict_type == AV_PICTURE_TYPE_B ? X264_TYPE_B :
X264_TYPE_AUTO;
- if (x4->params.b_tff != frame->top_field_first) {
+ if (x4->params.b_interlaced && x4->params.b_tff != frame->top_field_first) {
x4->params.b_tff = frame->top_field_first;
x264_encoder_reconfig(x4->enc, &x4->params);
}