# HG changeset patch # User michaelni # Date 1038042777 0 # Node ID 35d28522a1c5b14ae026de54250a99b855cb56fd # Parent 2cef5c4c0ca69a8c201bf8dd442154b0eafb57f7 moving init of some variables (hurry_up,...) to MPV_frame_start() diff -r 2cef5c4c0ca6 -r 35d28522a1c5 h263dec.c --- a/h263dec.c Fri Nov 22 07:53:06 2002 +0000 +++ b/h263dec.c Sat Nov 23 09:12:57 2002 +0000 @@ -358,9 +358,6 @@ printf("bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]); #endif - s->hurry_up= avctx->hurry_up; - s->error_resilience= avctx->error_resilience; - s->flags= avctx->flags; *data_size = 0; @@ -530,9 +527,9 @@ /* 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); + if(avctx->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(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size); if(s->next_p_frame_damaged){ if(s->pict_type==B_TYPE) diff -r 2cef5c4c0ca6 -r 35d28522a1c5 mpeg12.c --- a/mpeg12.c Fri Nov 22 07:53:06 2002 +0000 +++ b/mpeg12.c Sat Nov 23 09:12:57 2002 +0000 @@ -1915,7 +1915,7 @@ break; default: if (start_code >= SLICE_MIN_START_CODE && - start_code <= SLICE_MAX_START_CODE && s2->avctx->hurry_up<5) { + start_code <= SLICE_MAX_START_CODE && avctx->hurry_up<5) { ret = mpeg_decode_slice(avctx, picture, start_code, s->buffer, input_size); if (ret == DECODE_SLICE_EOP) { diff -r 2cef5c4c0ca6 -r 35d28522a1c5 mpegvideo.c --- a/mpegvideo.c Fri Nov 22 07:53:06 2002 +0000 +++ b/mpegvideo.c Sat Nov 23 09:12:57 2002 +0000 @@ -819,6 +819,9 @@ s->mb_skiped = 0; avctx->mbskip_table= s->mbskip_table; + s->hurry_up= s->avctx->hurry_up; + s->error_resilience= avctx->error_resilience; + if(avctx->flags&CODEC_FLAG_DR1){ if(avctx->get_buffer_callback(avctx, s->width, s->height, s->pict_type) < 0){ fprintf(stderr, "get_buffer() failed\n");