summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2020-06-09 10:48:06 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2020-06-09 10:52:44 -0400
commit483539f45cfbf7b7cb9c880588e2a012bcf5e54b (patch)
tree63b9ff1e2074ebb7ba7250b4e37d31f9f1d96c9a
parent52a82f5b84c74d3e1b94c44d7ee8391be9512551 (diff)
downloadgstreamer-plugins-bad-483539f45cfbf7b7cb9c880588e2a012bcf5e54b.tar.gz
v4l2slh264dec: Fix reading mode and start code type
These two controls are not pointer based, so we don't need to pass any size or pointer and need to copy the values afterward. This fixes H264 decoding regression with Hantro and RKVDEC drivers. Fixes 037730a787c6cdeeee5779c1834315c1ca764505 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1330>
-rw-r--r--sys/v4l2codecs/gstv4l2codech264dec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/v4l2codecs/gstv4l2codech264dec.c b/sys/v4l2codecs/gstv4l2codech264dec.c
index 0fa96dd78..5b7d3363d 100644
--- a/sys/v4l2codecs/gstv4l2codech264dec.c
+++ b/sys/v4l2codecs/gstv4l2codech264dec.c
@@ -115,13 +115,9 @@ gst_v4l2_codec_h264_dec_open (GstVideoDecoder * decoder)
struct v4l2_ext_control control[] = {
{
.id = V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE,
- .ptr = &self->decode_mode,
- .size = sizeof (self->decode_mode),
},
{
.id = V4L2_CID_MPEG_VIDEO_H264_START_CODE,
- .ptr = &self->start_code,
- .size = sizeof (self->start_code),
},
};
/* *INDENT-ON* */
@@ -141,6 +137,9 @@ gst_v4l2_codec_h264_dec_open (GstVideoDecoder * decoder)
return FALSE;
}
+ self->decode_mode = control[0].value;
+ self->start_code = control[1].value;
+
GST_INFO_OBJECT (self, "Opened H264 %s decoder %s",
is_frame_based (self) ? "frame based" : "slice based",
needs_start_codes (self) ? "using start-codes" : "withouth start-codes");