From 85eb2bee3a25f34984cae919f3a8cd292fb92c31 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 5 Jul 2014 16:55:43 +0200 Subject: demux: cosmetics: minimize code --- demux/demux.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'demux/demux.c') diff --git a/demux/demux.c b/demux/demux.c index 9884f91845..f3e57944d4 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -126,22 +126,9 @@ struct sh_stream *new_sh_stream(demuxer_t *demuxer, enum stream_type type) }; MP_TARRAY_APPEND(demuxer, demuxer->streams, demuxer->num_streams, sh); switch (sh->type) { - case STREAM_VIDEO: { - struct sh_video *sht = talloc_zero(demuxer, struct sh_video); - sh->video = sht; - break; - } - case STREAM_AUDIO: { - struct sh_audio *sht = talloc_zero(demuxer, struct sh_audio); - sh->audio = sht; - break; - } - case STREAM_SUB: { - struct sh_sub *sht = talloc_zero(demuxer, struct sh_sub); - sh->sub = sht; - break; - } - default: assert(false); + case STREAM_VIDEO: sh->video = talloc_zero(demuxer, struct sh_video); break; + case STREAM_AUDIO: sh->audio = talloc_zero(demuxer, struct sh_audio); break; + case STREAM_SUB: sh->sub = talloc_zero(demuxer, struct sh_sub); break; } sh->ds->selected = demuxer->stream_autoselect; -- cgit v1.2.3