mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-07 00:31:01 +00:00
theoradec: Add crop metadata before mapping the buffer content
Otherwise the buffer is not writable and the crop metadata can't be added.
This commit is contained in:
parent
a103fa85a9
commit
27408ee47f
1 changed files with 4 additions and 4 deletions
|
@ -1132,10 +1132,6 @@ theora_handle_image (GstTheoraDec * dec, th_ycbcr_buffer buf, GstBuffer ** out)
|
|||
if (G_UNLIKELY (result != GST_FLOW_OK))
|
||||
goto no_buffer;
|
||||
|
||||
if G_UNLIKELY
|
||||
(!gst_video_frame_map (&frame, &dec->vinfo, *out, GST_MAP_WRITE))
|
||||
goto invalid_frame;
|
||||
|
||||
if (!dec->has_cropping) {
|
||||
/* we need to crop the hard way */
|
||||
offset_x = dec->info.pic_x;
|
||||
|
@ -1171,6 +1167,10 @@ theora_handle_image (GstTheoraDec * dec, th_ycbcr_buffer buf, GstBuffer ** out)
|
|||
GST_CAT_TRACE_OBJECT (GST_CAT_PERFORMANCE, dec,
|
||||
"doing unavoidable video frame copy");
|
||||
|
||||
if G_UNLIKELY
|
||||
(!gst_video_frame_map (&frame, &dec->vinfo, *out, GST_MAP_WRITE))
|
||||
goto invalid_frame;
|
||||
|
||||
for (comp = 0; comp < 3; comp++) {
|
||||
width =
|
||||
GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (frame.info.finfo, comp, pic_width);
|
||||
|
|
Loading…
Reference in a new issue