mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 04:36:07 +00:00
u/sink: Make sure to free frame when we fail to decode
This commit is contained in:
parent
8225539178
commit
49e6514a3d
|
@ -480,6 +480,8 @@ convert_frame_r8g8b8_or_l8(struct xrt_frame_sink *xs, struct xrt_frame *xf)
|
|||
return;
|
||||
}
|
||||
if (!from_MJPEG_to_R8G8B8(converted, xf->size, xf->data)) {
|
||||
// Make sure to free frame when we fail to decode.
|
||||
xrt_frame_reference(&converted, NULL);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -530,6 +532,8 @@ convert_frame_r8g8b8_bayer_or_l8(struct xrt_frame_sink *xs, struct xrt_frame *xf
|
|||
return;
|
||||
}
|
||||
if (!from_MJPEG_to_R8G8B8(converted, xf->size, xf->data)) {
|
||||
// Make sure to free frame when we fail to decode.
|
||||
xrt_frame_reference(&converted, NULL);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -586,6 +590,8 @@ convert_frame_r8g8b8(struct xrt_frame_sink *xs, struct xrt_frame *xf)
|
|||
return;
|
||||
}
|
||||
if (!from_MJPEG_to_R8G8B8(converted, xf->size, xf->data)) {
|
||||
// Make sure to free frame when we fail to decode.
|
||||
xrt_frame_reference(&converted, NULL);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue