[FFmpeg-cvslog] r17221 - trunk/libavcodec/rv34.c

kostya subversion
Sat Feb 14 07:38:51 CET 2009


Author: kostya
Date: Sat Feb 14 07:38:50 2009
New Revision: 17221

Log:
Enable dropping frames for RV3/4

Modified:
   trunk/libavcodec/rv34.c

Modified: trunk/libavcodec/rv34.c
==============================================================================
--- trunk/libavcodec/rv34.c	Sat Feb 14 00:02:05 2009	(r17220)
+++ trunk/libavcodec/rv34.c	Sat Feb 14 07:38:50 2009	(r17221)
@@ -1408,6 +1408,15 @@ int ff_rv34_decode_frame(AVCodecContext 
     }
     if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == FF_B_TYPE)
         return -1;
+    /* skip b frames if we are in a hurry */
+    if(avctx->hurry_up && si.type==FF_B_TYPE) return buf_size;
+    if(   (avctx->skip_frame >= AVDISCARD_NONREF && si.type==FF_B_TYPE)
+       || (avctx->skip_frame >= AVDISCARD_NONKEY && si.type!=FF_I_TYPE)
+       ||  avctx->skip_frame >= AVDISCARD_ALL)
+        return buf_size;
+    /* skip everything if we are in a hurry>=5 */
+    if(avctx->hurry_up>=5)
+        return buf_size;
 
     for(i=0; i<slice_count; i++){
         int offset= get_slice_offset(avctx, slices_hdr, i);




More information about the ffmpeg-cvslog mailing list