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:
authorNicolas George <nicola.george@normalesup.org>2010-10-22 22:01:48 +0400
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-10-22 22:01:48 +0400
commitf9b4eef457dde49f1297f32a02f443cf9e1bc481 (patch)
tree17a2a29a9fa92ca11cc601955a92de4de66941db /libavcodec/libxvidff.c
parent4c3267aaad9927d30dbe4ecf8b45825e2b36326f (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.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 ||