Mercurial > libavcodec.hg
comparison vdpau.c @ 9013:b54938038170 libavcodec
100l, always declare variables at the top of a block, not inside a for ()
author | reimar |
---|---|
date | Mon, 23 Feb 2009 14:02:11 +0000 |
parents | b123ed268953 |
children | 058e47a00893 |
comparison
equal
deleted
inserted
replaced
9012:15a3df8c01fd | 9013:b54938038170 |
---|---|
129 | 129 |
130 void ff_vdpau_h264_picture_complete(MpegEncContext *s) | 130 void ff_vdpau_h264_picture_complete(MpegEncContext *s) |
131 { | 131 { |
132 H264Context *h = s->avctx->priv_data; | 132 H264Context *h = s->avctx->priv_data; |
133 struct vdpau_render_state *render; | 133 struct vdpau_render_state *render; |
134 int i; | |
134 | 135 |
135 render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; | 136 render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; |
136 assert(render); | 137 assert(render); |
137 | 138 |
138 render->info.h264.slice_count = h->slice_num; | 139 render->info.h264.slice_count = h->slice_num; |
139 if (render->info.h264.slice_count < 1) | 140 if (render->info.h264.slice_count < 1) |
140 return; | 141 return; |
141 | 142 |
142 for (int i = 0; i < 2; ++i) { | 143 for (i = 0; i < 2; ++i) { |
143 int foc = s->current_picture_ptr->field_poc[i]; | 144 int foc = s->current_picture_ptr->field_poc[i]; |
144 if (foc == INT_MAX) | 145 if (foc == INT_MAX) |
145 foc = 0; | 146 foc = 0; |
146 render->info.h264.field_order_cnt[i] = foc; | 147 render->info.h264.field_order_cnt[i] = foc; |
147 } | 148 } |