aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2009-02-17 13:41:27 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2009-02-17 13:41:27 +0000
commitce09f9270a8bf43212dad58fcb73fee2900c364f (patch)
treee1d68db72d2585dce7d70e7f14a948b44c35abb5 /libavcodec/h264.c
parentde86157836aa8b2616d9fd9f56a1c1e55ff632df (diff)
downloadffmpeg-ce09f9270a8bf43212dad58fcb73fee2900c364f.tar.gz
Move initialization of {luma,chroma}_weight_flag[] up,
to make sure they are always initialized. Patch by Gwenole Beauchesne g${name} splitted-desktop com Originally committed as revision 17393 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index c1e3cfaff3..cb27476ea4 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3046,6 +3046,11 @@ static void implicit_weight_table(H264Context *h){
int ref0, ref1, i;
int cur_poc = s->current_picture_ptr->poc;
+ for (i = 0; i < 2; i++) {
+ h->luma_weight_flag[i] = 0;
+ h->chroma_weight_flag[i] = 0;
+ }
+
if( h->ref_count[0] == 1 && h->ref_count[1] == 1
&& h->ref_list[0][0].poc + h->ref_list[1][0].poc == 2*cur_poc){
h->use_weight= 0;
@@ -3057,10 +3062,6 @@ static void implicit_weight_table(H264Context *h){
h->use_weight_chroma= 2;
h->luma_log2_weight_denom= 5;
h->chroma_log2_weight_denom= 5;
- for (i = 0; i < 2; i++) {
- h->luma_weight_flag[i] = 0;
- h->chroma_weight_flag[i] = 0;
- }
for(ref0=0; ref0 < h->ref_count[0]; ref0++){
int poc0 = h->ref_list[0][ref0].poc;