v4l2slh264dec: Minor cleanup
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 28 Jul 2020 22:39:52 +0000 (18:39 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 10 Sep 2020 15:21:57 +0000 (15:21 +0000)
Move few variables in their respective scope.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1563>

sys/v4l2codecs/gstv4l2codech264dec.c

index 5caf15f0286b042b6e7b4761c1d91a5fdbc46905..7f67917c180e1252b02015c83fbe40c1bc52964b 100644 (file)
@@ -848,9 +848,6 @@ gst_v4l2_codec_h264_dec_output_picture (GstH264Decoder * decoder,
   GstV4l2CodecH264Dec *self = GST_V4L2_CODEC_H264_DEC (decoder);
   GstVideoDecoder *vdec = GST_VIDEO_DECODER (decoder);
   GstV4l2Request *request = gst_h264_picture_get_user_data (picture);
-  guint32 frame_num;
-  GstH264Picture *other_pic;
-  GstV4l2Request *other_request;
 
   GST_DEBUG_OBJECT (self, "Output picture %u", picture->system_frame_number);
 
@@ -861,6 +858,10 @@ gst_v4l2_codec_h264_dec_output_picture (GstH264Decoder * decoder,
     goto error;
 
   while (TRUE) {
+    guint32 frame_num;
+    GstH264Picture *other_pic;
+    GstV4l2Request *other_request;
+
     if (!gst_v4l2_decoder_dequeue_src (self->decoder, &frame_num)) {
       GST_ELEMENT_ERROR (self, STREAM, DECODE,
           ("Decoder did not produce a frame"), (NULL));