File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 5050#include <libavutil/pixdesc.h>
5151#include <libavutil/pixfmt.h>
5252#include <libavutil/hwcontext_drm.h>
53+ #if __STDC_VERSION__ < 202311L
54+ #include <stdalign.h> // for alignof
55+ #endif
5356#include <stdbool.h>
5457#include <stdint.h>
5558
@@ -2294,8 +2297,10 @@ static void av_drm_prime_to_ug_drm_prime(struct av_conv_data d)
22942297 (struct drm_prime_frame * ) (void * ) d .dst_buffer ;
22952298 memset (out , 0 , sizeof (struct drm_prime_frame ));
22962299
2297-
2298- AVDRMFrameDescriptor * av_drm_frame = (struct AVDRMFrameDescriptor * ) in_frame -> data [0 ];
2300+ assert ((uintptr_t ) in_frame -> data [0 ] % alignof(AVDRMFrameDescriptor ) ==
2301+ 0 );
2302+ AVDRMFrameDescriptor * av_drm_frame =
2303+ (struct AVDRMFrameDescriptor * ) (void * ) in_frame -> data [0 ];
22992304 assert (av_drm_frame -> nb_layers == 1 );
23002305 AVDRMLayerDescriptor * layer = & av_drm_frame -> layers [0 ];
23012306
You can’t perform that action at this time.
0 commit comments