mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 21:12:26 +00:00
oggdemux: Create full Opus caps with all fields
https://bugzilla.gnome.org/show_bug.cgi?id=757152
This commit is contained in:
parent
bcd7b2fff2
commit
cab8671f0c
1 changed files with 7 additions and 1 deletions
|
@ -1992,6 +1992,8 @@ extract_tags_kate (GstOggStream * pad, ogg_packet * packet)
|
|||
static gboolean
|
||||
setup_opus_mapper (GstOggStream * pad, ogg_packet * packet)
|
||||
{
|
||||
GstBuffer *buffer;
|
||||
|
||||
if (packet->bytes < 19)
|
||||
return FALSE;
|
||||
|
||||
|
@ -2007,7 +2009,11 @@ setup_opus_mapper (GstOggStream * pad, ogg_packet * packet)
|
|||
GST_INFO ("Opus has a pre-skip of %" G_GINT64_FORMAT " samples",
|
||||
-pad->granule_offset);
|
||||
|
||||
pad->caps = gst_caps_new_empty_simple ("audio/x-opus");
|
||||
buffer =
|
||||
gst_buffer_new_wrapped (g_memdup (packet->packet, packet->bytes),
|
||||
packet->bytes);
|
||||
pad->caps = gst_codec_utils_opus_create_caps_from_header (buffer, NULL);
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue