From: Sebastian Dröge Date: Mon, 5 Nov 2018 15:07:32 +0000 (+0200) Subject: ccextractor: Handle multiple caption metas per buffer X-Git-Tag: 1.19.3~507^2~3854 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ba9493ff12478a8e8116dd860e5b16adc29e571;p=platform%2Fupstream%2Fgstreamer.git ccextractor: Handle multiple caption metas per buffer --- diff --git a/ext/closedcaption/gstccextractor.c b/ext/closedcaption/gstccextractor.c index 72eeecc..b6bd22b 100644 --- a/ext/closedcaption/gstccextractor.c +++ b/ext/closedcaption/gstccextractor.c @@ -349,12 +349,13 @@ gst_cc_extractor_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) GstCCExtractor *filter = (GstCCExtractor *) parent; GstFlowReturn flow = GST_FLOW_OK; GstVideoCaptionMeta *cc_meta; + gpointer iter = NULL; - cc_meta = gst_buffer_get_video_caption_meta (buf); - if (cc_meta) + while ((cc_meta = + (GstVideoCaptionMeta *) gst_buffer_iterate_meta_filtered (buf, &iter, + GST_VIDEO_CAPTION_META_API_TYPE)) && flow == GST_FLOW_OK) { flow = gst_cc_extractor_handle_meta (filter, buf, cc_meta); - else - GST_DEBUG_OBJECT (filter, "No CC meta on buffer"); + } /* If there's an issue handling the CC, return immediately */ if (flow != GST_FLOW_OK) {