summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorArpi <arpi@thot.banki.hu>2002-03-28 23:07:54 +0000
committerArpi <arpi@thot.banki.hu>2002-03-28 23:07:54 +0000
commit60e575acc86aa5f1cfd87598f21cdb7b920ab5d5 (patch)
tree3041e280859d8ef16d6512c00d4e2c57ae81b24e /libavcodec/mpegvideo.c
parent4d69fbc99ef807e278165c9ad09b6a38c2a20de4 (diff)
using Juanjo's way to pass forced type - especially as I_TYPE/P_TYPE defines aren't exported in the public interface, and the flagged method matches the way as qscale forcing work
Originally committed as revision 366 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 2a7aca21d2..55159c68c6 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -514,7 +514,8 @@ int MPV_encode_picture(AVCodecContext *avctx,
init_put_bits(&s->pb, buf, buf_size, NULL, NULL);
- s->force_type= avctx->force_type;
+ s->force_type= (avctx->flags&CODEC_FLAG_TYPE) ?
+ (avctx->key_frame ? I_TYPE : P_TYPE) : 0;
if (!s->intra_only) {
/* first picture of GOP is intra */
if (s->picture_in_gop_number % s->gop_size==0 || s->force_type==I_TYPE){