diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-02-14 06:38:50 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-02-14 06:38:50 +0000 |
commit | 7fa70598e83cca650717d02ac96bcf55e9f97c19 (patch) | |
tree | c07d3f926cc722f5a7099f3ff6824f4d4e29cbca /libavcodec/rv34.c | |
parent | eca406e2843d3daec4567d902d4309a21598bcb5 (diff) | |
download | ffmpeg-7fa70598e83cca650717d02ac96bcf55e9f97c19.tar.gz |
Enable dropping frames for RV3/4
Originally committed as revision 17221 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 820fb22b21..607a92837c 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1408,6 +1408,15 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, } 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); |