diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2016-02-01 13:02:13 +0000 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2016-02-02 16:17:43 +0100 |
commit | 24168a2093b9a9380d6b47d1dc2600545489f6b7 (patch) | |
tree | 2b19e372dc7043cb97ddab6661220862894df178 /gst-libs/gst/vaapi/gstvaapiencoder_h264.c | |
parent | eb2daed2a7495f9049126a198548d68938346096 (diff) | |
download | gstreamer-vaapi-24168a2093b9a9380d6b47d1dc2600545489f6b7.tar.gz |
vaapi: fix 'ISO C90 forbids mixed declarations and code' compiler warnings
Declare variables at the beginning of a code block, which
is how it's done in GStreamer.
https://bugzilla.gnome.org/show_bug.cgi?id=759192
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapiencoder_h264.c')
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiencoder_h264.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c index 758af7f2..3ad9378b 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c @@ -591,11 +591,12 @@ bs_write_subset_sps (GstBitWriter * bs, for (i = 1; i <= num_views_minus1; i++) { guint32 num_anchor_refs_l0 = 0; + guint32 num_anchor_refs_l1 = 0; + WRITE_UE (bs, num_anchor_refs_l0); for (j = 0; j < num_anchor_refs_l0; j++) WRITE_UE (bs, 0); - guint32 num_anchor_refs_l1 = 0; WRITE_UE (bs, num_anchor_refs_l1); for (j = 0; j < num_anchor_refs_l1; j++) WRITE_UE (bs, 0); @@ -603,11 +604,12 @@ bs_write_subset_sps (GstBitWriter * bs, for (i = 1; i <= num_views_minus1; i++) { guint32 num_non_anchor_refs_l0 = 0; + guint32 num_non_anchor_refs_l1 = 0; + WRITE_UE (bs, num_non_anchor_refs_l0); for (j = 0; j < num_non_anchor_refs_l0; j++) WRITE_UE (bs, 0); - guint32 num_non_anchor_refs_l1 = 0; WRITE_UE (bs, num_non_anchor_refs_l1); for (j = 0; j < num_non_anchor_refs_l1; j++) WRITE_UE (bs, 0); @@ -2452,13 +2454,14 @@ reset_properties (GstVaapiEncoderH264 * encoder) for (i = 0; i < encoder->num_views; i++) { GstVaapiH264ViewRefPool *const ref_pool = &encoder->ref_pools[i]; + GstVaapiH264ViewReorderPool *const reorder_pool = + &encoder->reorder_pools[i]; + ref_pool->max_reflist0_count = 1; ref_pool->max_reflist1_count = encoder->num_bframes > 0; ref_pool->max_ref_frames = ref_pool->max_reflist0_count + ref_pool->max_reflist1_count; - GstVaapiH264ViewReorderPool *const reorder_pool = - &encoder->reorder_pools[i]; reorder_pool->frame_index = 0; } } |