summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-07-14 21:39:36 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-07-14 21:39:36 +0000
commit8c3eba7c625fb9bf4b6e254b216871cac2b91283 (patch)
tree5e709f18b895d14f5b10bbe9f6e458a7e98d0e49 /libavcodec/mpeg12.c
parentfec9ccb7e6fdc6844b1e2d1bb95436b36f47a412 (diff)
skip_idct
skip_frame skip_loop_filter Originally committed as revision 4440 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 33fc2faa75..a609ee34e5 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -3086,7 +3086,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
/* find start next code */
start_code = find_start_code(&buf_ptr, buf_end);
if (start_code < 0){
- if(s2->pict_type != B_TYPE || avctx->hurry_up==0){
+ if(s2->pict_type != B_TYPE || avctx->skip_frame <= AVDISCARD_DEFAULT){
if(avctx->thread_count > 1){
int i;
@@ -3146,6 +3146,10 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
}
/* skip b frames if we are in a hurry */
if(avctx->hurry_up && s2->pict_type==B_TYPE) break;
+ if( (avctx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==B_TYPE)
+ ||(avctx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=I_TYPE)
+ || avctx->skip_frame >= AVDISCARD_ALL)
+ break;
/* skip everything if we are in a hurry>=5 */
if(avctx->hurry_up>=5) break;