diff options
author | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2011-01-04 10:32:05 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2011-01-04 10:37:26 -0300 |
commit | 7b97c2de6ab5729b622e4b9e8cecd69d936d5442 (patch) | |
tree | 63e97d1877dcf0f03e4383ab1518185b2cbbe649 /ext | |
parent | 9a2de968363d3dd8e305d25b968fe765511c8050 (diff) |
x264enc: Handle codec/encoder tags
Make x264enc drop video-codec and codec tags and replace
encoder/encoder-version with x264 and its build number
Fixes #621465
Diffstat (limited to 'ext')
-rw-r--r-- | ext/x264/gstx264enc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c index a12978b4..1d94e8eb 100644 --- a/ext/x264/gstx264enc.c +++ b/ext/x264/gstx264enc.c @@ -1495,6 +1495,18 @@ gst_x264_enc_sink_event (GstPad * pad, GstEvent * event) case GST_EVENT_EOS: 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 */ + } + break; /* no flushing if flush received, * buffers in encoder are considered (in the) past */ case GST_EVENT_CUSTOM_DOWNSTREAM:{ |