changeset 36576:fb65d6e1a9b2

demux_demuxers: Simplify, merge declaration and initialization.
author reimar
date Mon, 20 Jan 2014 22:08:41 +0000
parents a50d90b27e2d
children 5fed1c3bfd39
files libmpdemux/demux_demuxers.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_demuxers.c	Mon Jan 20 22:08:40 2014 +0000
+++ b/libmpdemux/demux_demuxers.c	Mon Jan 20 22:08:41 2014 +0000
@@ -37,9 +37,7 @@
 demuxer_t*  new_demuxers_demuxer(demuxer_t* vd, demuxer_t* ad, demuxer_t* sd) {
   // Video is the most important :-)
   demuxer_t* ret = alloc_demuxer(vd->stream, DEMUXER_TYPE_DEMUXERS, vd->filename);
-  dd_priv_t* priv;
-
-  priv = malloc(sizeof(dd_priv_t));
+  dd_priv_t* priv = malloc(sizeof(*priv));
   priv->vd = vd;
   priv->ad = ad;
   priv->sd = sd;