summaryrefslogtreecommitdiffstats
path: root/gst/mpegdemux
diff options
context:
space:
mode:
authorJosep Torra <n770galaxy@gmail.com>2009-08-07 18:35:42 +0200
committerJosep Torra <n770galaxy@gmail.com>2009-08-07 18:35:42 +0200
commitda95f4a873624ab92ceec191f8b4ccc49247c3dd (patch)
tree6ba2b2b8ed4640cde8b2aee8e2840a804d4a6349 /gst/mpegdemux
parent3c22fb611bdbc9bc3a768264ea3e8b726d2c231c (diff)
downloadgst-plugins-bad-da95f4a873624ab92ceec191f8b4ccc49247c3dd.tar.gz
gst-plugins-bad-da95f4a873624ab92ceec191f8b4ccc49247c3dd.tar.bz2
gst-plugins-bad-da95f4a873624ab92ceec191f8b4ccc49247c3dd.zip
mpegpsdemux: added caps for AAC and fixed playback of a clip with LPCM
Diffstat (limited to 'gst/mpegdemux')
-rw-r--r--gst/mpegdemux/gstmpegdemux.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index 88b7bae5..5fe27711 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -140,7 +140,7 @@ static GstStaticPadTemplate audio_template =
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS ("audio/mpeg, "
- "mpegversion = (int) 1;"
+ "mpegversion = (int) { 1, 4 };"
"audio/x-private1-lpcm; "
"audio/x-private1-ac3;" "audio/x-private1-dts;" "audio/ac3")
);
@@ -374,7 +374,12 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type)
case ST_PRIVATE_DATA:
case ST_MHEG:
case ST_DSMCC:
+ break;
case ST_AUDIO_AAC:
+ template = klass->audio_template;
+ name = g_strdup_printf ("audio_%02x", id);
+ caps = gst_caps_new_simple ("audio/mpeg",
+ "mpegversion", G_TYPE_INT, 4, NULL);
break;
case ST_VIDEO_H264:
template = klass->video_template;
@@ -679,7 +684,7 @@ gst_flups_demux_handle_dvd_event (GstFluPSDemux * demux, GstEvent * event)
break;
case 0x2:
case 0x3:
- /* MPEG audio without and with extension stream are
+ /* MPEG audio without and with extension stream are
* treated the same */
stream_id = 0xC0 + i;
temp = gst_flups_demux_get_stream (demux, stream_id, ST_AUDIO_MPEG1);
@@ -1296,7 +1301,7 @@ gst_flups_demux_src_query (GstPad * pad, GstQuery * query)
break;
}
- /* Upstream didn't know, so we can only answer TIME queries from
+ /* Upstream didn't know, so we can only answer TIME queries from
* here on */
if (format != GST_FORMAT_TIME) {
GST_DEBUG_OBJECT (demux, "duration not supported for format %d",
@@ -1942,7 +1947,15 @@ gst_flups_demux_parse_psm (GstFluPSDemux * demux)
GST_DEBUG_OBJECT (demux, "Stream type %02X with id %02X and %u bytes info",
stream_type, stream_id, stream_info_length);
- demux->psm[stream_id] = stream_type;
+ if (G_LIKELY (stream_id != 0xbd))
+ demux->psm[stream_id] = stream_type;
+ else {
+ /* Ignore stream type for private_stream_1 and discover it looking at
+ * the stream data.
+ * Fixes demuxing some clips with lpcm that was wrongly declared as
+ * mpeg audio */
+ GST_DEBUG_OBJECT (demux, "stream type for private_stream_1 ignored");
+ }
es_map_base += stream_info_length;
}