# HG changeset patch # User michaelni # Date 1036925647 0 # Node ID 32de034be20e9f37cc35b1aeed26d7c80f5a2fe9 # Parent 1bd52b59bcd11651d31ac4b94a26a923246e661c hurry_up>=5 -> skip everything except header & set pict_type&key_frame diff -r 1bd52b59bcd1 -r 32de034be20e avcodec.h --- a/avcodec.h Sat Nov 09 13:57:54 2002 +0000 +++ b/avcodec.h Sun Nov 10 10:54:07 2002 +0000 @@ -5,8 +5,8 @@ #define LIBAVCODEC_VERSION_INT 0x000406 #define LIBAVCODEC_VERSION "0.4.6" -#define LIBAVCODEC_BUILD 4636 -#define LIBAVCODEC_BUILD_STR "4636" +#define LIBAVCODEC_BUILD 4637 +#define LIBAVCODEC_BUILD_STR "4637" enum CodecID { CODEC_ID_NONE, @@ -356,7 +356,7 @@ /** * encoding: unused - * decoding: set by user. 1-> skip b frames, 2-> skip idct/dequant too + * decoding: set by user. 1-> skip b frames, 2-> skip idct/dequant too, 5-> skip everything except header */ int hurry_up; diff -r 1bd52b59bcd1 -r 32de034be20e h263dec.c --- a/h263dec.c Sat Nov 09 13:57:54 2002 +0000 +++ b/h263dec.c Sun Nov 10 10:54:07 2002 +0000 @@ -525,10 +525,16 @@ fprintf(stderr, "header damaged\n"); return -1; } + + s->avctx->key_frame = (s->pict_type == I_TYPE); + s->avctx->pict_type = s->pict_type; + /* skip b frames if we dont have reference frames */ if(s->num_available_buffers<2 && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size); /* skip b frames if we are in a hurry */ if(s->hurry_up && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size); + /* skip everything if we are in a hurry>=5 */ + if(s->hurry_up>=5) return get_consumed_bytes(s, buf_size); if(s->next_p_frame_damaged){ if(s->pict_type==B_TYPE)