mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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
This commit is contained in:
parent
9a2de96836
commit
7b97c2de6a
1 changed files with 12 additions and 0 deletions
|
@ -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:{
|
||||
|
|
Loading…
Reference in a new issue