From: Olivier CrĂȘte Date: Wed, 25 Jul 2018 20:39:18 +0000 (-0400) Subject: matroskademux: Extract codec_data for AV1 X-Git-Tag: 1.16.2~464 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=415caf4b87c53a0aa3990493a7c350dd0e9d7c87;p=platform%2Fupstream%2Fgst-plugins-good.git matroskademux: Extract codec_data for AV1 According to https://github.com/Matroska-Org/matroska-specification/blob/av1-mappin/codec/av1.md --- diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 32d4598..e305e5c 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -5627,6 +5627,17 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext * *codec_name = g_strdup_printf ("On2 VP9"); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_AV1)) { caps = gst_caps_new_empty_simple ("video/x-av1"); + if (data) { + GstBuffer *priv; + + priv = gst_buffer_new_wrapped (g_memdup (data, size), size); + gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, priv, NULL); + gst_buffer_unref (priv); + } else { + GST_WARNING ("No codec data found, assuming output is byte-stream"); + gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "byte-stream", + NULL); + } *codec_name = g_strdup_printf ("AOM AV1"); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_PRORES)) { guint32 fourcc;