From c140e12dabffb80b894db7359d9f329e21391dc7 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 3 May 2006 14:30:21 +0000 Subject: [PATCH] gst/qtdemux/qtdemux.c: Clean up one piece of logic slightly and remove a dead code block. Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): Clean up one piece of logic slightly and remove a dead code block. --- ChangeLog | 6 ++++++ gst/qtdemux/qtdemux.c | 24 +++++++----------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2382f2e5df..965d162bdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-05-03 Jan Schmidt + + * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): + Clean up one piece of logic slightly and remove a + dead code block. + 2006-05-03 Tim-Philipp Müller * docs/plugins/Makefile.am: diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 83b4924367..81cde54923 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -3229,27 +3229,17 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) mp4a = qtdemux_tree_get_child_by_type (stsd, FOURCC_mp4a); wave = NULL; - if (mp4a) - wave = qtdemux_tree_get_child_by_type (mp4a, FOURCC_wave); - esds = NULL; - if (wave) - esds = qtdemux_tree_get_child_by_type (wave, FOURCC_esds); - else if (mp4a) - esds = qtdemux_tree_get_child_by_type (mp4a, FOURCC_esds); + if (mp4a) { + wave = qtdemux_tree_get_child_by_type (mp4a, FOURCC_wave); + if (wave) + esds = qtdemux_tree_get_child_by_type (wave, FOURCC_esds); + if (!esds) + esds = qtdemux_tree_get_child_by_type (mp4a, FOURCC_esds); + } if (esds) { gst_qtdemux_handle_esds (qtdemux, stream, esds); -#if 0 - GstBuffer *buffer; - int len = QTDEMUX_GUINT32_GET (esds->data); - - buffer = gst_buffer_new_and_alloc (len - 8); - memcpy (GST_BUFFER_DATA (buffer), esds->data + 8, len - 8); - - gst_caps_set_simple (stream->caps, "codec_data", - GST_TYPE_BUFFER, buffer, NULL); -#endif } else { if (QTDEMUX_FOURCC_GET (stsd->data + 16 + 4) == GST_MAKE_FOURCC ('Q', 'D', 'M', '2')) {