changeset 10051:e73c688ca84c libavcodec

Simplify initialization of AVSubtitle by using memset.
author reimar
date Sat, 15 Aug 2009 00:52:41 +0000
parents b8313eb3dca8
children 15a27663cce4
files dvdsubdec.c
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dvdsubdec.c	Sat Aug 15 00:46:33 2009 +0000
+++ b/dvdsubdec.c	Sat Aug 15 00:52:41 2009 +0000
@@ -173,11 +173,7 @@
 
     if (buf_size < 10)
         return -1;
-    sub_header->rects = NULL;
-    sub_header->num_rects = 0;
-    sub_header->format = 0;
-    sub_header->start_display_time = 0;
-    sub_header->end_display_time = 0;
+    memset(sub_header, 0, sizeof(*sub_header));
 
     if (AV_RB16(buf) == 0) {   /* HD subpicture with 4-byte offsets */
         big_offsets = 1;