diff options
Diffstat (limited to 'src/demuxers/demux_str.c')
-rw-r--r-- | src/demuxers/demux_str.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/demuxers/demux_str.c b/src/demuxers/demux_str.c index f125f09c5..aec526eb6 100644 --- a/src/demuxers/demux_str.c +++ b/src/demuxers/demux_str.c @@ -188,9 +188,7 @@ static int open_str_file(demux_str_t *this) { unsigned char check_bytes[STR_CHECK_BYTES]; int local_offset, sector, channel; - for (channel = 0; channel < STR_MAX_CHANNELS; channel++) { - this->channel_type[channel] = 0; - } + memset(this->channel_type, 0, sizeof(this->channel_type)); this->input->seek(this->input, 0, SEEK_SET); if (this->input->read(this->input, check_bytes, STR_CHECK_BYTES) != @@ -550,7 +548,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return NULL; } - this = xine_xmalloc (sizeof (demux_str_t)); + this = calloc(1, sizeof(demux_str_t)); this->stream = stream; this->input = input; @@ -589,7 +587,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str void *demux_str_init_plugin (xine_t *xine, void *data) { demux_str_class_t *this; - this = xine_xmalloc (sizeof (demux_str_class_t)); + this = calloc(1, sizeof(demux_str_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.description = N_("Sony Playstation STR file demux plugin"); |