diff options
author | Edward Hervey <bilboed@bilboed.com> | 2007-11-12 19:22:24 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2007-11-12 19:22:24 +0000 |
commit | 72221ceb5e353ea9193c737e87e4daff6a0accec (patch) | |
tree | bfdd174384c8b1a9b7c738cf8074e2c8678f609a /gst | |
parent | 8b2cf9ce1204bbc0ce9bec8a6478d2f80f213e13 (diff) | |
download | gst-plugins-bad-72221ceb5e353ea9193c737e87e4daff6a0accec.tar.gz gst-plugins-bad-72221ceb5e353ea9193c737e87e4daff6a0accec.tar.bz2 gst-plugins-bad-72221ceb5e353ea9193c737e87e4daff6a0accec.zip |
gst/flv/gstflvparse.c: Add mapping for Nellymoser ASAO audio codec.
Original commit message from CVS:
* gst/flv/gstflvparse.c:
Add mapping for Nellymoser ASAO audio codec.
(gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Make sure we
actually have data to read at the end of the tag. This avoids trying
to allocate negative buffers.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/flv/gstflvparse.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gst/flv/gstflvparse.c b/gst/flv/gstflvparse.c index a04c89e9..87a63f50 100644 --- a/gst/flv/gstflvparse.c +++ b/gst/flv/gstflvparse.c @@ -460,6 +460,9 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data, "signed", G_TYPE_BOOLEAN, TRUE, "width", G_TYPE_INT, width, "depth", G_TYPE_INT, width, NULL); break; + case 6: + caps = gst_caps_new_simple ("audio/x-nellymoser", NULL); + break; default: GST_WARNING_OBJECT (demux, "unsupported audio codec tag %u", codec_tag); } @@ -525,6 +528,9 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data, case 3: caps = gst_caps_new_simple ("audio/x-raw-int", NULL); break; + case 6: + caps = gst_caps_new_simple ("audio/x-nellymoser", NULL); + break; default: GST_WARNING_OBJECT (demux, "unsupported audio codec tag %u", codec_tag); } @@ -564,6 +570,12 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data, } } + /* Check if we have anything to push */ + if (demux->tag_data_size <= codec_data) { + GST_LOG_OBJECT (demux, "Nothing left in this tag, returning"); + goto beach; + } + /* Create buffer from pad */ ret = gst_pad_alloc_buffer (demux->audio_pad, GST_BUFFER_OFFSET_NONE, demux->tag_data_size - codec_data, GST_PAD_CAPS (demux->audio_pad), @@ -799,6 +811,12 @@ gst_flv_parse_tag_video (GstFLVDemux * demux, const guint8 * data, } } + /* Check if we have anything to push */ + if (demux->tag_data_size <= codec_data) { + GST_LOG_OBJECT (demux, "Nothing left in this tag, returning"); + goto beach; + } + /* Create buffer from pad */ ret = gst_pad_alloc_buffer (demux->video_pad, GST_BUFFER_OFFSET_NONE, demux->tag_data_size - codec_data, GST_PAD_CAPS (demux->video_pad), |