diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2018-11-05 17:07:32 +0200 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2018-11-06 16:21:06 +0000 |
commit | 7ba9493ff12478a8e8116dd860e5b16adc29e571 (patch) | |
tree | 4606381cb4cdd130a2efb54a36386be490b37f06 /ext/closedcaption/gstccextractor.c | |
parent | 23b0172ee9fb53e4b213e7223c9bf05d40df2180 (diff) | |
download | gstreamer-plugins-bad-7ba9493ff12478a8e8116dd860e5b16adc29e571.tar.gz |
ccextractor: Handle multiple caption metas per buffer
Diffstat (limited to 'ext/closedcaption/gstccextractor.c')
-rw-r--r-- | ext/closedcaption/gstccextractor.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/closedcaption/gstccextractor.c b/ext/closedcaption/gstccextractor.c index 72eeecc78..b6bd22bff 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) { |