changeset 26874:c73c138aad88

Cosmetics: simplify
author reimar
date Tue, 27 May 2008 17:30:20 +0000
parents a90971b955af
children c276296cb6f8
files libmpdemux/demuxer.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Tue May 27 17:27:06 2008 +0000
+++ b/libmpdemux/demuxer.c	Tue May 27 17:30:20 2008 +0000
@@ -265,10 +265,9 @@
     if(demuxer->a_streams[id]){
         mp_msg(MSGT_DEMUXER,MSGL_WARN,MSGTR_AudioStreamRedefined,id);
     } else {
-        sh_audio_t *sh;
+        sh_audio_t *sh = calloc(1, sizeof(sh_audio_t));
         mp_msg(MSGT_DEMUXER,MSGL_V,MSGTR_FoundAudioStream,id);
-        demuxer->a_streams[id]=calloc(1, sizeof(sh_audio_t));
-        sh = demuxer->a_streams[id];
+        demuxer->a_streams[id] = sh;
         // set some defaults
         sh->samplesize=2;
         sh->sample_format=AF_FORMAT_S16_NE;