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

Francois Cartegnie fcvlcdev at free.fr
Mon May 11 15:56:49 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 272f541057..8ffa1ea400 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -92,8 +92,10 @@ typedef struct attribute_packed
 {
     ts_cmd_header_t 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.4



More information about the vlc-devel mailing list