mirror of
https://github.com/lbgos/rift-s-linux.git
synced 2026-10-26 23:01:19 +01:00
u/sink: Make sure to free frame when we fail to decode
This commit is contained in:
1 parent
8225539178
commit
49e6514a3d
1 file changed
+6
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user