summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5ec02de)
raw | patch | inline | side by side (parent: 5ec02de)
author | Miguel Angel Cabrera Moya <madmac2501@gmail.com> | |
Sat, 22 Jan 2011 16:31:40 +0000 (17:31 +0100) | ||
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | |
Mon, 24 Jan 2011 13:07:08 +0000 (13:07 +0000) |
To modify an event tag is necessary to be sure that x264enc
has its own copy.
Also fix indentation.
https://bugzilla.gnome.org/show_bug.cgi?id=640272
has its own copy.
Also fix indentation.
https://bugzilla.gnome.org/show_bug.cgi?id=640272
ext/x264/gstx264enc.c | patch | blob | history |
diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c
index 1d94e8eb10ae0c8f2c003d6272886197bc8e914f..b1fbb5f00f151cfe044a326f72158e3a32b7b771 100644 (file)
--- a/ext/x264/gstx264enc.c
+++ b/ext/x264/gstx264enc.c
gst_x264_enc_flush_frames (encoder, TRUE);
break;
case GST_EVENT_TAG:{
- GstTagList *tags = NULL;
-
- gst_event_parse_tag (event, &tags);
- /* 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_CODEC);
- gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_ENCODER, "x264",
- GST_TAG_ENCODER_VERSION, X264_BUILD, NULL);
- /* push is done below */
- }
+ GstTagList *tags = NULL;
+
+ event =
+ GST_EVENT (gst_mini_object_make_writable (GST_MINI_OBJECT (event)));
+
+ gst_event_parse_tag (event, &tags);
+ /* 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_CODEC);
+ gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_ENCODER, "x264",
+ GST_TAG_ENCODER_VERSION, X264_BUILD, NULL);
+ /* push is done below */
break;
/* no flushing if flush received,
* buffers in encoder are considered (in the) past */
+ }
case GST_EVENT_CUSTOM_DOWNSTREAM:{
const GstStructure *s;
s = gst_event_get_structure (event);