mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
fieldanalysis: Don't reset the context on DISCONT
On discont, the queue of frames was being cleared, but also the context reset. We only need to clear the queue.
This commit is contained in:
parent
16ce440e7f
commit
e3b7cb8899
1 changed files with 8 additions and 3 deletions
|
@ -313,9 +313,8 @@ static guint64 block_score_for_row_5_tap (GstFieldAnalysis * filter,
|
|||
static gfloat opposite_parity_windowed_comb (GstFieldAnalysis * filter,
|
||||
FieldAnalysisFields * fields);
|
||||
|
||||
|
||||
static void
|
||||
gst_field_analysis_reset (GstFieldAnalysis * filter)
|
||||
gst_field_analysis_empty_queue (GstFieldAnalysis * filter)
|
||||
{
|
||||
if (filter->frames) {
|
||||
guint length = g_queue_get_length (filter->frames);
|
||||
|
@ -327,6 +326,12 @@ gst_field_analysis_reset (GstFieldAnalysis * filter)
|
|||
length--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_field_analysis_reset (GstFieldAnalysis * filter)
|
||||
{
|
||||
gst_field_analysis_empty_queue (filter);
|
||||
GST_DEBUG_OBJECT (filter, "Resetting context");
|
||||
memset (filter->results, 0, 2 * sizeof (FieldAnalysis));
|
||||
filter->is_telecine = FALSE;
|
||||
|
@ -1711,7 +1716,7 @@ gst_field_analysis_chain (GstPad * pad, GstBuffer * buf)
|
|||
}
|
||||
}
|
||||
|
||||
gst_field_analysis_reset (filter);
|
||||
gst_field_analysis_empty_queue (filter);
|
||||
|
||||
if (ret != GST_FLOW_OK) {
|
||||
GST_DEBUG_OBJECT (filter,
|
||||
|
|
Loading…
Reference in a new issue