mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
[MOVED FROM BAD 15/57] 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.
This commit is contained in:
parent
2c69886497
commit
9aef7a25e3
1 changed files with 18 additions and 0 deletions
|
@ -460,6 +460,9 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data,
|
||||||
"signed", G_TYPE_BOOLEAN, TRUE,
|
"signed", G_TYPE_BOOLEAN, TRUE,
|
||||||
"width", G_TYPE_INT, width, "depth", G_TYPE_INT, width, NULL);
|
"width", G_TYPE_INT, width, "depth", G_TYPE_INT, width, NULL);
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
caps = gst_caps_new_simple ("audio/x-nellymoser", NULL);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
GST_WARNING_OBJECT (demux, "unsupported audio codec tag %u", codec_tag);
|
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:
|
case 3:
|
||||||
caps = gst_caps_new_simple ("audio/x-raw-int", NULL);
|
caps = gst_caps_new_simple ("audio/x-raw-int", NULL);
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
caps = gst_caps_new_simple ("audio/x-nellymoser", NULL);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
GST_WARNING_OBJECT (demux, "unsupported audio codec tag %u", codec_tag);
|
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 */
|
/* Create buffer from pad */
|
||||||
ret = gst_pad_alloc_buffer (demux->audio_pad, GST_BUFFER_OFFSET_NONE,
|
ret = gst_pad_alloc_buffer (demux->audio_pad, GST_BUFFER_OFFSET_NONE,
|
||||||
demux->tag_data_size - codec_data, GST_PAD_CAPS (demux->audio_pad),
|
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 */
|
/* Create buffer from pad */
|
||||||
ret = gst_pad_alloc_buffer (demux->video_pad, GST_BUFFER_OFFSET_NONE,
|
ret = gst_pad_alloc_buffer (demux->video_pad, GST_BUFFER_OFFSET_NONE,
|
||||||
demux->tag_data_size - codec_data, GST_PAD_CAPS (demux->video_pad),
|
demux->tag_data_size - codec_data, GST_PAD_CAPS (demux->video_pad),
|
||||||
|
|
Loading…
Reference in a new issue