diff options
author | Nicolas George <nicola.george@normalesup.org> | 2010-10-22 22:01:48 +0400 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-10-22 22:01:48 +0400 |
commit | f9b4eef457dde49f1297f32a02f443cf9e1bc481 (patch) | |
tree | 17a2a29a9fa92ca11cc601955a92de4de66941db /libavcodec/libxvidff.c | |
parent | 4c3267aaad9927d30dbe4ecf8b45825e2b36326f (diff) |
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
Diffstat (limited to 'libavcodec/libxvidff.c')
-rw-r--r-- | libavcodec/libxvidff.c | 6 |
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 || |