Mercurial > libavcodec.hg
comparison rv34.c @ 8827:03ea23e85f42 libavcodec
Enable dropping frames for RV3/4
author | kostya |
---|---|
date | Sat, 14 Feb 2009 06:38:50 +0000 |
parents | 58706d84c938 |
children | 71620eeff338 |
comparison
equal
deleted
inserted
replaced
8826:bffe8e6cb10e | 8827:03ea23e85f42 |
---|---|
1406 av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n"); | 1406 av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n"); |
1407 return -1; | 1407 return -1; |
1408 } | 1408 } |
1409 if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == FF_B_TYPE) | 1409 if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == FF_B_TYPE) |
1410 return -1; | 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 for(i=0; i<slice_count; i++){ | 1421 for(i=0; i<slice_count; i++){ |
1413 int offset= get_slice_offset(avctx, slices_hdr, i); | 1422 int offset= get_slice_offset(avctx, slices_hdr, i); |
1414 int size; | 1423 int size; |
1415 if(i+1 == slice_count) | 1424 if(i+1 == slice_count) |