From 90ea6fce1eb28c5b4fdff5b9e93771243d28d18d Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Sat, 15 Aug 2009 00:52:41 +0000 Subject: Simplify initialization of AVSubtitle by using memset. Originally committed as revision 19643 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dvdsubdec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libavcodec/dvdsubdec.c') diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index b445d3e456..49b0802f58 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -173,11 +173,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header, 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; -- cgit v1.2.3