mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 11:29:55 +00:00
x264enc: Fix unitialized variable and taglist event
This commit is contained in:
parent
ca77ad4e05
commit
711d2b18a7
1 changed files with 7 additions and 3 deletions
|
@ -1560,11 +1560,15 @@ gst_x264_enc_sink_event (GstVideoEncoder * encoder, GstEvent * event)
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_TAG:{
|
case GST_EVENT_TAG:{
|
||||||
GstTagList *tags = NULL;
|
GstTagList *tags = NULL;
|
||||||
|
const GstStructure *s;
|
||||||
event =
|
|
||||||
GST_EVENT (gst_mini_object_make_writable (GST_MINI_OBJECT (event)));
|
|
||||||
|
|
||||||
gst_event_parse_tag (event, &tags);
|
gst_event_parse_tag (event, &tags);
|
||||||
|
tags = gst_tag_list_copy (tags);
|
||||||
|
s = gst_event_get_structure (event);
|
||||||
|
|
||||||
|
gst_event_take (&event, gst_event_new_tag (gst_structure_get_name (s),
|
||||||
|
tags));
|
||||||
|
|
||||||
/* drop codec/video-codec and replace encoder/encoder-version */
|
/* drop codec/video-codec and replace encoder/encoder-version */
|
||||||
gst_tag_list_remove_tag (tags, GST_TAG_VIDEO_CODEC);
|
gst_tag_list_remove_tag (tags, GST_TAG_VIDEO_CODEC);
|
||||||
gst_tag_list_remove_tag (tags, GST_TAG_CODEC);
|
gst_tag_list_remove_tag (tags, GST_TAG_CODEC);
|
||||||
|
|
Loading…
Reference in a new issue