summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
Diffstat (limited to 'stream')
-rw-r--r--stream/tv.c2
-rw-r--r--stream/tvi_def.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/stream/tv.c b/stream/tv.c
index 55b7033adb..76f4850999 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -815,7 +815,7 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer)
sh_audio->channels;
// emulate WF for win32 codecs:
- sh_audio->wf = malloc(sizeof(WAVEFORMATEX));
+ sh_audio->wf = malloc(sizeof(*sh_audio->wf));
sh_audio->wf->wFormatTag = sh_audio->format;
sh_audio->wf->nChannels = sh_audio->channels;
sh_audio->wf->wBitsPerSample = sh_audio->samplesize * 8;
diff --git a/stream/tvi_def.h b/stream/tvi_def.h
index 01c2222621..d6a4600ae8 100644
--- a/stream/tvi_def.h
+++ b/stream/tvi_def.h
@@ -51,13 +51,13 @@ static tvi_handle_t *new_handle(void)
if (!h)
return NULL;
- h->priv = malloc(sizeof(priv_t));
+ h->priv = calloc(1, sizeof(priv_t));
if (!h->priv)
{
free(h);
return NULL;
}
- memset(h->priv, 0, sizeof(priv_t));
+
h->functions = &functions;
h->seq = 0;
h->chanlist = -1;