diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index a3efe81c5b7fd836b4bf8defd0331c67a171d181..616b5f37fc3663a8c58322564dbcac7302cfe701 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -5,8 +5,8 @@
 
 #define LIBAVCODEC_VERSION_INT 0x000406
 #define LIBAVCODEC_VERSION     "0.4.6"
-#define LIBAVCODEC_BUILD       4606
-#define LIBAVCODEC_BUILD_STR   "4606"
+#define LIBAVCODEC_BUILD       4607
+#define LIBAVCODEC_BUILD_STR   "4607"
 
 enum CodecID {
     CODEC_ID_NONE, 
@@ -130,7 +130,8 @@ typedef struct AVCodecContext {
 #define FF_ASPECT_16_9_525 5
     int gop_size; /* 0 = intra only */
     enum PixelFormat pix_fmt;  /* pixel format, see PIX_FMT_xxx */
-
+    int repeat_pict; /* set this to 1 if you want the decoder
+                        to repeat frames for 3:2 pulldown (MPEG-2) */
     /* if non NULL, 'draw_horiz_band' is called by the libavcodec
        decoder to draw an horizontal band. It improve cache usage. Not
        all codecs can do that. You must check the codec capabilities
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 65cba431f8f429dde569ade91cedd7413a08bab0..eeea81a9efc30f5652771b4cbdbc442d6a4ea94c 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1588,7 +1588,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
     buf_ptr = buf;
     buf_end = buf + buf_size;
     
-    if (s->repeat_field % 2 == 1) {
+    if (s->repeat_field % 2 == 1 && avctx->repeat_pict) {
         s->repeat_field++;
         //fprintf(stderr,"\nRepeating last frame: %d -> %d! pict: %d %d", avctx->frame_number-1, avctx->frame_number,
         //                                                         s2->picture_number, s->repeat_field);