GStreamer: Remove tags when an invalid QVariant is assigned.

Clear the tag list before syncing with reference set so old values
are removed and explicitly remove invalid QVariants from the reference
set so that the type correction doesn't result in invalid values being
written instead.

Change-Id: I7d1bdc95cd2a2d601720db84c9b3ef629477bc99
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
Andrew den Exter
2014-03-04 18:03:20 +10:00
committed by The Qt Project
parent 0e280e78e2
commit cf68c9d02c
2 changed files with 15 additions and 8 deletions

View File

@@ -756,6 +756,8 @@ void CameraBinSession::setMetaData(const QMap<QByteArray, QVariant> &data)
GstIterator *elements = gst_bin_iterate_all_by_interface(GST_BIN(m_camerabin), GST_TYPE_TAG_SETTER);
GstElement *element = 0;
while (gst_iterator_next(elements, (void**)&element) == GST_ITERATOR_OK) {
gst_tag_setter_reset_tags(GST_TAG_SETTER(element));
QMapIterator<QByteArray, QVariant> it(data);
while (it.hasNext()) {
it.next();