Mercurial > libavcodec.hg
comparison dvdsubdec.c @ 10051:e73c688ca84c libavcodec
Simplify initialization of AVSubtitle by using memset.
author | reimar |
---|---|
date | Sat, 15 Aug 2009 00:52:41 +0000 |
parents | a1b42791b13d |
children | 8ac9bc10b485 |
comparison
equal
deleted
inserted
replaced
10050:b8313eb3dca8 | 10051:e73c688ca84c |
---|---|
171 int i; | 171 int i; |
172 int is_menu = 0; | 172 int is_menu = 0; |
173 | 173 |
174 if (buf_size < 10) | 174 if (buf_size < 10) |
175 return -1; | 175 return -1; |
176 sub_header->rects = NULL; | 176 memset(sub_header, 0, sizeof(*sub_header)); |
177 sub_header->num_rects = 0; | |
178 sub_header->format = 0; | |
179 sub_header->start_display_time = 0; | |
180 sub_header->end_display_time = 0; | |
181 | 177 |
182 if (AV_RB16(buf) == 0) { /* HD subpicture with 4-byte offsets */ | 178 if (AV_RB16(buf) == 0) { /* HD subpicture with 4-byte offsets */ |
183 big_offsets = 1; | 179 big_offsets = 1; |
184 offset_size = 4; | 180 offset_size = 4; |
185 cmd_pos = 6; | 181 cmd_pos = 6; |