From 342763a158d0a365d1cfce6bf6c2b945aa82bd60 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Thu, 21 Oct 2021 00:35:00 +0200 Subject: [PATCH] interlace: Clear stored_fields together with stored_frame These fields belong together. Part-of: --- subprojects/gst-plugins-bad/gst/interlace/gstinterlace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst/interlace/gstinterlace.c b/subprojects/gst-plugins-bad/gst/interlace/gstinterlace.c index 62bbf30503..569a4251f3 100644 --- a/subprojects/gst-plugins-bad/gst/interlace/gstinterlace.c +++ b/subprojects/gst-plugins-bad/gst/interlace/gstinterlace.c @@ -321,6 +321,7 @@ gst_interlace_reset (GstInterlace * interlace) if (interlace->stored_frame) { gst_buffer_unref (interlace->stored_frame); interlace->stored_frame = NULL; + interlace->stored_fields = 0; } } @@ -685,6 +686,7 @@ gst_interlace_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) if (interlace->stored_frame) { gst_buffer_unref (interlace->stored_frame); interlace->stored_frame = NULL; + interlace->stored_fields = 0; } ret = gst_pad_push_event (interlace->srcpad, event); break; @@ -1238,9 +1240,9 @@ gst_interlace_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) if (interlace->stored_frame) { gst_buffer_unref (interlace->stored_frame); + interlace->stored_frame = NULL; + interlace->stored_fields = 0; } - interlace->stored_frame = NULL; - interlace->stored_fields = 0; if (interlace->top_field_first) { interlace->field_index = 0;