diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-11-23 09:12:57 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-11-23 09:12:57 +0000 |
commit | f8fd15e03f8a50062dc0b1e6e8e3189a82dc14fc (patch) | |
tree | 638f875869e78feafca53cbbba2e12775547a74f /libavcodec | |
parent | 47930f093e478dd600d0dd7bcfca0ab81e884ead (diff) | |
download | ffmpeg-streaming-f8fd15e03f8a50062dc0b1e6e8e3189a82dc14fc.zip ffmpeg-streaming-f8fd15e03f8a50062dc0b1e6e8e3189a82dc14fc.tar.gz |
moving init of some variables (hurry_up,...) to MPV_frame_start()
Originally committed as revision 1271 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h263dec.c | 7 | ||||
-rw-r--r-- | libavcodec/mpeg12.c | 2 | ||||
-rw-r--r-- | libavcodec/mpegvideo.c | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 256dd84..1682f4d 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -358,9 +358,6 @@ uint64_t time= rdtsc(); 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 @@ retry: /* 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 --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index fd5ebf1..db95438 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1915,7 +1915,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, 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 --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 5e67ebd..b3565d3 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -819,6 +819,9 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) 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"); |