48 lines
1.7 KiB
Diff
48 lines
1.7 KiB
Diff
From 4d51af92e3bfc5c6093807645244d719150b99e4 Mon Sep 17 00:00:00 2001
|
|
From: Hugues Fruchet <hugues.fruchet@foss.st.com>
|
|
Date: Tue, 21 Nov 2023 10:51:39 +0100
|
|
Subject: [PATCH 68/68] v4l2codecs: vp8: fix support of unaligned videos
|
|
|
|
Fix gst_v4l2_codec_vp8_enc_copy_input_buffer() to support copy of
|
|
unaligned video.
|
|
Upstream-Status: Pending
|
|
---
|
|
sys/v4l2codecs/gstv4l2codecvp8enc.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/sys/v4l2codecs/gstv4l2codecvp8enc.c b/sys/v4l2codecs/gstv4l2codecvp8enc.c
|
|
index af84a44..42c2b1b 100644
|
|
--- a/sys/v4l2codecs/gstv4l2codecvp8enc.c
|
|
+++ b/sys/v4l2codecs/gstv4l2codecvp8enc.c
|
|
@@ -440,11 +440,11 @@ gst_v4l2_codec_vp8_enc_copy_input_buffer (GstV4l2CodecVp8Enc * self,
|
|
{
|
|
GstVideoFrame src_frame;
|
|
GstVideoFrame dest_frame;
|
|
- GstVideoInfo dest_vinfo;
|
|
+ GstVideoInfo src_vinfo;
|
|
GstBuffer *buffer;
|
|
GstFlowReturn flow_ret;
|
|
|
|
- gst_video_info_set_format (&dest_vinfo, GST_VIDEO_INFO_FORMAT (&self->vinfo),
|
|
+ gst_video_info_set_format (&src_vinfo, GST_VIDEO_INFO_FORMAT (&self->vinfo),
|
|
self->width, self->height);
|
|
|
|
flow_ret = gst_buffer_pool_acquire_buffer (GST_BUFFER_POOL (self->sink_pool),
|
|
@@ -461,11 +461,11 @@ gst_v4l2_codec_vp8_enc_copy_input_buffer (GstV4l2CodecVp8Enc * self,
|
|
if (!buffer)
|
|
goto fail;
|
|
|
|
- if (!gst_video_frame_map (&src_frame, &self->vinfo,
|
|
+ if (!gst_video_frame_map (&src_frame, &src_vinfo,
|
|
frame->input_buffer, GST_MAP_READ))
|
|
goto fail;
|
|
|
|
- if (!gst_video_frame_map (&dest_frame, &dest_vinfo, buffer, GST_MAP_WRITE)) {
|
|
+ if (!gst_video_frame_map (&dest_frame, &self->vinfo, buffer, GST_MAP_WRITE)) {
|
|
gst_video_frame_unmap (&dest_frame);
|
|
goto fail;
|
|
}
|
|
--
|
|
2.25.1
|
|
|