From 5edbe32754b78320d366c56785a8d6cb70c4c051 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 1 May 2004 02:46:38 +0000 Subject: [PATCH] gst/matroska/matroska-demux.c: Really detect ac-3 audio. Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_audio_caps): Really detect ac-3 audio. * gst/typefind/gsttypefindfunctions.c: (matroska_type_find): really detect matroska files (off-by-1). --- ChangeLog | 7 +++++++ gst/matroska/matroska-demux.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 30b42dc4af..619e4bbd76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-04-30 Ronald Bultje + + * gst/matroska/matroska-demux.c: (gst_matroska_demux_audio_caps): + Really detect ac-3 audio. + * gst/typefind/gsttypefindfunctions.c: (matroska_type_find): + really detect matroska files (off-by-1). + 2004-04-30 David Schleef * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index a038aade26..895b8d220c 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -2375,7 +2375,8 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * audiocontext, } else { gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 32, 64, NULL); } - } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_AC3) || + } else if (!strncmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_AC3, + strlen (GST_MATROSKA_CODEC_ID_AUDIO_AC3)) || !strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_DTS)) { caps = gst_caps_new_simple ("audio/x-ac3", NULL); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_VORBIS)) { @@ -2427,6 +2428,7 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * audiocontext, "mpegversion", G_TYPE_INT, mpegversion, NULL); } else { GST_WARNING ("Unknown codec '%s', cannot build Caps", codec_id); + g_print ("Codec=%s\n", codec_id); return NULL; }