diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 73b7a1117f..2fd6c2cdb6 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -1231,6 +1231,11 @@ skip_details: gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_VIDEO_VP9); } else if (!strcmp (mimetype, "video/x-av1")) { gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_VIDEO_AV1); + gst_matroska_mux_free_codec_priv (context); + /* Create av1C header */ + if (codec_buf != NULL) + gst_buffer_extract_dup (codec_buf, 0, gst_buffer_get_size (codec_buf), + &context->codec_priv, &context->codec_priv_size); } else if (!strcmp (mimetype, "video/mpeg")) { gint mpegversion;