metadata: reset state if there is something to reset

The condition was wrong and as such the element was writing the same tags on subsequent
images if reused.
This commit is contained in:
Stefan Kost 2009-07-17 15:47:10 +03:00
parent 4ef918df28
commit 4307be631d

View file

@ -1151,8 +1151,8 @@ gst_base_metadata_calculate_offsets (GstBaseMetadata * base)
goto done;
}
metadata_chunk_array_remove_zero_size (&META_DATA_INJECT_CHUNKS (base->
metadata));
metadata_chunk_array_remove_zero_size (&META_DATA_INJECT_CHUNKS
(base->metadata));
metadata_lazy_update (base->metadata);
@ -1420,7 +1420,7 @@ gst_base_metadata_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_base_metadata_reset_streaming (filter);
if (filter->state != MT_STATE_PARSED)
if (filter->state == MT_STATE_PARSED)
gst_base_metadata_reset_parsing (filter);
break;
default: