[vlc-devel] [PATCH 5/5] input: es_out_timeshift: use union for block offset

Francois Cartegnie fcvlcdev at free.fr
Thu Apr 23 13:00:14 CEST 2020


---
 src/input/es_out_timeshift.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index b1468b3e95..f12af5f01d 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -90,8 +90,10 @@ typedef struct attribute_packed
 {
     TIMESHIFT_CMD_HEADER;
     es_out_id_t *p_es;
-    block_t *p_block;
-    int     i_offset;  /* We do not use file > INT_MAX */
+    union{
+        block_t *p_block;
+        int     i_offset;  /* We do not use file > INT_MAX */
+    };
 } ts_cmd_send_t;
 
 typedef struct attribute_packed
-- 
2.25.3



More information about the vlc-devel mailing list