Originally committed as revision 17221 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -1408,6 +1408,15 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, · 1407 unmodified lines | ||
| 1408 | 1408 | } |
| 1409 | 1409 | if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == FF_B_TYPE) |
| 1410 | 1410 | return -1; |
| 1411 | + /* skip b frames if we are in a hurry */ | |
| 1412 | + if(avctx->hurry_up && si.type==FF_B_TYPE) return buf_size; | |
| 1413 | + if( (avctx->skip_frame >= AVDISCARD_NONREF && si.type==FF_B_TYPE) | |
| 1414 | + || (avctx->skip_frame >= AVDISCARD_NONKEY && si.type!=FF_I_TYPE) | |
| 1415 | + || avctx->skip_frame >= AVDISCARD_ALL) | |
| 1416 | + return buf_size; | |
| 1417 | + /* skip everything if we are in a hurry>=5 */ | |
| 1418 | + if(avctx->hurry_up>=5) | |
| 1419 | + return buf_size; | |
| 1411 | 1420 | |
| 1412 | 1421 | for(i=0; i<slice_count; i++){ |
| 1413 | 1422 | int offset= get_slice_offset(avctx, slices_hdr, i); |