Only add a single closed caption meta
Otherwise, having a stream go through a parser multiple times would
result in duplicate closed caption meta.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1396>
upstream commit id :
31d5d04bb1f5e3f6acdef8460193019237ecf5df
Change-Id: I587de0415e78e9e0de21ef079e594bec9bfedabd
}
if (h264parse->closedcaptions_size > 0) {
+#ifdef TIZEN_FEATURE_UPSTREAM
+ if (!gst_buffer_get_meta (buffer, GST_VIDEO_CAPTION_META_API_TYPE)) {
+ gst_buffer_add_video_caption_meta (buffer,
+ h264parse->closedcaptions_type, h264parse->closedcaptions,
+ h264parse->closedcaptions_size);
+ } else {
+ GST_DEBUG_OBJECT (h264parse, "Closed caption data already found on buffer, "
+ "discarding to avoid duplication");
+ }
+#else
gst_buffer_add_video_caption_meta (buffer,
h264parse->closedcaptions_type, h264parse->closedcaptions,
h264parse->closedcaptions_size);
+#endif
h264parse->closedcaptions_type = GST_VIDEO_CAPTION_TYPE_UNKNOWN;
h264parse->closedcaptions_size = 0;
buf = frame->buffer = gst_buffer_make_writable (frame->buffer);
}
+#ifdef TIZEN_FEATURE_UPSTREAM
+ if (!gst_buffer_get_meta (buf, GST_VIDEO_CAPTION_META_API_TYPE)) {
+ gst_buffer_add_video_caption_meta (buf,
+ mpvparse->closedcaptions_type, mpvparse->closedcaptions,
+ mpvparse->closedcaptions_size);
+ } else {
+ GST_DEBUG_OBJECT (mpvparse, "Closed caption data already found on buffer, "
+ "discarding to avoid duplication");
+ }
+#else
gst_buffer_add_video_caption_meta (buf,
mpvparse->closedcaptions_type, mpvparse->closedcaptions,
mpvparse->closedcaptions_size);
+#endif
mpvparse->closedcaptions_type = GST_VIDEO_CAPTION_TYPE_UNKNOWN;
mpvparse->closedcaptions_size = 0;
Name: gst-plugins-bad
Version: 1.16.2
-Release: 20
+Release: 21
Summary: GStreamer Streaming-Media Framework Plug-Ins
License: LGPL-2.0+
Group: Multimedia/Framework