aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicola.george@normalesup.org>2010-10-22 18:01:48 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-10-22 18:01:48 +0000
commitf9b4eef457dde49f1297f32a02f443cf9e1bc481 (patch)
tree17a2a29a9fa92ca11cc601955a92de4de66941db
parent4c3267aaad9927d30dbe4ecf8b45825e2b36326f (diff)
downloadffmpeg-f9b4eef457dde49f1297f32a02f443cf9e1bc481.tar.gz
Use forced key frames when encoding with libxvid.
Patch by Nicolas George, nicolas D george A normalesup D org Originally committed as revision 25550 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/libxvidff.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index f8aeb9c8cb..f5273548c5 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
@@ -449,7 +449,11 @@ static int xvid_encode_frame(AVCodecContext *avctx,
xvid_enc_frame.vop_flags = x->vop_flags;
xvid_enc_frame.vol_flags = x->vol_flags;
xvid_enc_frame.motion = x->me_flags;
- xvid_enc_frame.type = XVID_TYPE_AUTO;
+ xvid_enc_frame.type =
+ picture->pict_type == FF_I_TYPE ? XVID_TYPE_IVOP :
+ picture->pict_type == FF_P_TYPE ? XVID_TYPE_PVOP :
+ picture->pict_type == FF_B_TYPE ? XVID_TYPE_BVOP :
+ XVID_TYPE_AUTO;
/* Pixel aspect ratio setting */
if (avctx->sample_aspect_ratio.num < 1 || avctx->sample_aspect_ratio.num > 255 ||