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
@ -1992,6 +1992,8 @@ extract_tags_kate (GstOggStream * pad, ogg_packet * packet)
|
|||||||
static gboolean
|
static gboolean
|
||||||
setup_opus_mapper (GstOggStream * pad, ogg_packet * packet)
|
setup_opus_mapper (GstOggStream * pad, ogg_packet * packet)
|
||||||
{
|
{
|
||||||
|
GstBuffer *buffer;
|
||||||
|
|
||||||
if (packet->bytes < 19)
|
if (packet->bytes < 19)
|
||||||
return FALSE;
|
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",
|
GST_INFO ("Opus has a pre-skip of %" G_GINT64_FORMAT " samples",
|
||||||
-pad->granule_offset);
|
-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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user