mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
asfdemux: only add "format" field with fourcc to WMV caps
Doesn't make sense for e.g. H264 or MJPEG.
This commit is contained in:
parent
7e3811cc21
commit
12509f4a80
1 changed files with 9 additions and 4 deletions
|
@ -2487,6 +2487,7 @@ gst_asf_demux_add_video_stream (GstASFDemux * demux,
|
||||||
guint8 ** p_data, guint64 * p_size)
|
guint8 ** p_data, guint64 * p_size)
|
||||||
{
|
{
|
||||||
GstTagList *tags = NULL;
|
GstTagList *tags = NULL;
|
||||||
|
GstStructure *caps_s;
|
||||||
GstBuffer *extradata = NULL;
|
GstBuffer *extradata = NULL;
|
||||||
GstPad *src_pad;
|
GstPad *src_pad;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
@ -2544,10 +2545,14 @@ gst_asf_demux_add_video_stream (GstASFDemux * demux,
|
||||||
gst_structure_remove_field (s, "framerate");
|
gst_structure_remove_field (s, "framerate");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add fourcc format to caps, some proprietary decoders seem to need it */
|
caps_s = gst_caps_get_structure (caps, 0);
|
||||||
str = g_strdup_printf ("%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (video->tag));
|
|
||||||
gst_caps_set_simple (caps, "format", G_TYPE_STRING, str, NULL);
|
/* add format field with fourcc to WMV/VC1 caps to differentiate variants */
|
||||||
g_free (str);
|
if (gst_structure_has_name (caps_s, "video/x-wmv")) {
|
||||||
|
str = g_strdup_printf ("%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (video->tag));
|
||||||
|
gst_caps_set_simple (caps, "format", G_TYPE_STRING, str, NULL);
|
||||||
|
g_free (str);
|
||||||
|
}
|
||||||
|
|
||||||
if (codec_name) {
|
if (codec_name) {
|
||||||
tags = gst_tag_list_new (GST_TAG_VIDEO_CODEC, codec_name, NULL);
|
tags = gst_tag_list_new (GST_TAG_VIDEO_CODEC, codec_name, NULL);
|
||||||
|
|
Loading…
Reference in a new issue