mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
cmmlenc: fix caps handling
This commit is contained in:
parent
fbaf47543c
commit
78ed46cc4f
1 changed files with 3 additions and 4 deletions
|
@ -442,9 +442,11 @@ gst_cmml_enc_parse_tag_head (GstCmmlEnc * enc, GstCmmlTagHead * head)
|
||||||
goto alloc_error;
|
goto alloc_error;
|
||||||
headers = g_list_append (headers, head_buf);
|
headers = g_list_append (headers, head_buf);
|
||||||
|
|
||||||
caps = gst_pad_get_current_caps (enc->srcpad);
|
caps = gst_pad_query_caps (enc->srcpad, NULL);
|
||||||
caps = gst_cmml_enc_set_header_on_caps (enc, caps,
|
caps = gst_cmml_enc_set_header_on_caps (enc, caps,
|
||||||
ident_buf, preamble_buf, head_buf);
|
ident_buf, preamble_buf, head_buf);
|
||||||
|
gst_pad_set_caps (enc->srcpad, caps);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
while (headers) {
|
while (headers) {
|
||||||
buffer = GST_BUFFER (headers->data);
|
buffer = GST_BUFFER (headers->data);
|
||||||
|
@ -458,8 +460,6 @@ gst_cmml_enc_parse_tag_head (GstCmmlEnc * enc, GstCmmlTagHead * head)
|
||||||
goto push_error;
|
goto push_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_caps_unref (caps);
|
|
||||||
|
|
||||||
enc->sent_headers = TRUE;
|
enc->sent_headers = TRUE;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -469,7 +469,6 @@ flow_unexpected:
|
||||||
enc->flow_return = GST_FLOW_ERROR;
|
enc->flow_return = GST_FLOW_ERROR;
|
||||||
return;
|
return;
|
||||||
push_error:
|
push_error:
|
||||||
gst_caps_unref (caps);
|
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
alloc_error:
|
alloc_error:
|
||||||
for (walk = headers; walk; walk = walk->next)
|
for (walk = headers; walk; walk = walk->next)
|
||||||
|
|
Loading…
Reference in a new issue