diff mpegvideo.c @ 298:e20de99b6295 libavcodec

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
author arpi_esp
date Thu, 28 Mar 2002 23:07:54 +0000
parents a1234c032636
children 826b179dad50
line wrap: on
line diff
--- a/mpegvideo.c	Thu Mar 28 22:50:22 2002 +0000
+++ b/mpegvideo.c	Thu Mar 28 23:07:54 2002 +0000
@@ -514,7 +514,8 @@
 
     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){