Mercurial > libavcodec.hg
comparison vc1.c @ 3707:e7f4366d9731 libavcodec
2989l: Set avctx->has_b_frames value in header and don't change it
author | kostya |
---|---|
date | Tue, 12 Sep 2006 04:13:00 +0000 |
parents | 653fc28f78b4 |
children | a8d2bd2e1928 |
comparison
equal
deleted
inserted
replaced
3706:fb73a0142544 | 3707:e7f4366d9731 |
---|---|
4083 | 4083 |
4084 if (decode_entry_point(avctx, &gb) < 0) | 4084 if (decode_entry_point(avctx, &gb) < 0) |
4085 return -1; | 4085 return -1; |
4086 } | 4086 } |
4087 avctx->has_b_frames= !!(avctx->max_b_frames); | 4087 avctx->has_b_frames= !!(avctx->max_b_frames); |
4088 s->low_delay = !avctx->has_b_frames; | |
4088 | 4089 |
4089 s->mb_width = (avctx->coded_width+15)>>4; | 4090 s->mb_width = (avctx->coded_width+15)>>4; |
4090 s->mb_height = (avctx->coded_height+15)>>4; | 4091 s->mb_height = (avctx->coded_height+15)>>4; |
4091 | 4092 |
4092 /* Allocate mb bitplanes */ | 4093 /* Allocate mb bitplanes */ |
4142 //we need to set current_picture_ptr before reading the header, otherwise we cant store anyting im there | 4143 //we need to set current_picture_ptr before reading the header, otherwise we cant store anyting im there |
4143 if(s->current_picture_ptr==NULL || s->current_picture_ptr->data[0]){ | 4144 if(s->current_picture_ptr==NULL || s->current_picture_ptr->data[0]){ |
4144 int i= ff_find_unused_picture(s, 0); | 4145 int i= ff_find_unused_picture(s, 0); |
4145 s->current_picture_ptr= &s->picture[i]; | 4146 s->current_picture_ptr= &s->picture[i]; |
4146 } | 4147 } |
4147 | |
4148 avctx->has_b_frames= !s->low_delay; | |
4149 | 4148 |
4150 //for advanced profile we need to unescape buffer | 4149 //for advanced profile we need to unescape buffer |
4151 if (avctx->codec_id == CODEC_ID_VC1) { | 4150 if (avctx->codec_id == CODEC_ID_VC1) { |
4152 int i, buf_size2; | 4151 int i, buf_size2; |
4153 buf2 = av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE); | 4152 buf2 = av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE); |