Mercurial > libavcodec.hg
comparison h264.c @ 5984:ba13cc3e38bb libavcodec
Initialize function pointers used by error resilience code before any
potential error return from decode_slice_header.
Fixes issue 284.
author | heydowns |
---|---|
date | Wed, 05 Dec 2007 05:24:54 +0000 |
parents | 80103098c797 |
children | bc6d765d1d53 |
comparison
equal
deleted
inserted
replaced
5983:f0ae240d8349 | 5984:ba13cc3e38bb |
---|---|
3873 int default_ref_list_done = 0; | 3873 int default_ref_list_done = 0; |
3874 int last_pic_structure; | 3874 int last_pic_structure; |
3875 | 3875 |
3876 s->dropable= h->nal_ref_idc == 0; | 3876 s->dropable= h->nal_ref_idc == 0; |
3877 | 3877 |
3878 if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !h->nal_ref_idc){ | |
3879 s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab; | |
3880 s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab; | |
3881 }else{ | |
3882 s->me.qpel_put= s->dsp.put_h264_qpel_pixels_tab; | |
3883 s->me.qpel_avg= s->dsp.avg_h264_qpel_pixels_tab; | |
3884 } | |
3885 | |
3878 first_mb_in_slice= get_ue_golomb(&s->gb); | 3886 first_mb_in_slice= get_ue_golomb(&s->gb); |
3879 | 3887 |
3880 if((s->flags2 & CODEC_FLAG2_CHUNKS) && first_mb_in_slice == 0){ | 3888 if((s->flags2 & CODEC_FLAG2_CHUNKS) && first_mb_in_slice == 0){ |
3881 h0->current_slice = 0; | 3889 h0->current_slice = 0; |
3882 if (!s0->first_field) | 3890 if (!s0->first_field) |
4237 s->qscale, | 4245 s->qscale, |
4238 h->deblocking_filter, h->slice_alpha_c0_offset/2, h->slice_beta_offset/2, | 4246 h->deblocking_filter, h->slice_alpha_c0_offset/2, h->slice_beta_offset/2, |
4239 h->use_weight, | 4247 h->use_weight, |
4240 h->use_weight==1 && h->use_weight_chroma ? "c" : "" | 4248 h->use_weight==1 && h->use_weight_chroma ? "c" : "" |
4241 ); | 4249 ); |
4242 } | |
4243 | |
4244 if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !h->nal_ref_idc){ | |
4245 s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab; | |
4246 s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab; | |
4247 }else{ | |
4248 s->me.qpel_put= s->dsp.put_h264_qpel_pixels_tab; | |
4249 s->me.qpel_avg= s->dsp.avg_h264_qpel_pixels_tab; | |
4250 } | 4250 } |
4251 | 4251 |
4252 return 0; | 4252 return 0; |
4253 } | 4253 } |
4254 | 4254 |