mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
tests: adaptivedemux: only check for data length after seek
When the test involves doing a seek, only check for data size after the seek. The final segment range after seek might be different/smaller than the threshold for doing the seek and doing the check before seeking would fail.
This commit is contained in:
parent
00a74e98b3
commit
04e4392afe
2 changed files with 8 additions and 4 deletions
|
@ -175,6 +175,8 @@ gst_adaptive_demux_test_check_received_data (GstAdaptiveDemuxTestEngine *
|
||||||
(guint64) gst_buffer_get_size (buffer),
|
(guint64) gst_buffer_get_size (buffer),
|
||||||
testOutputStreamData->expected_size, stream->segment_start);
|
testOutputStreamData->expected_size, stream->segment_start);
|
||||||
|
|
||||||
|
/* Only verify after seeking */
|
||||||
|
if (testData->seek_event && testData->seeked)
|
||||||
fail_unless (stream->total_received_size +
|
fail_unless (stream->total_received_size +
|
||||||
stream->segment_received_size +
|
stream->segment_received_size +
|
||||||
gst_buffer_get_size (buffer) <= testOutputStreamData->expected_size,
|
gst_buffer_get_size (buffer) <= testOutputStreamData->expected_size,
|
||||||
|
@ -357,6 +359,7 @@ testSeekAdaptiveDemuxSendsData (GstAdaptiveDemuxTestEngine * engine,
|
||||||
g_cond_wait (&testData->test_task_state_cond,
|
g_cond_wait (&testData->test_task_state_cond,
|
||||||
&testData->test_task_state_lock);
|
&testData->test_task_state_lock);
|
||||||
}
|
}
|
||||||
|
testData->seeked = TRUE;
|
||||||
g_mutex_unlock (&testData->test_task_state_lock);
|
g_mutex_unlock (&testData->test_task_state_lock);
|
||||||
/* we can continue now, but this buffer will be rejected by AppSink
|
/* we can continue now, but this buffer will be rejected by AppSink
|
||||||
* because it is in flushing mode
|
* because it is in flushing mode
|
||||||
|
|
|
@ -113,6 +113,7 @@ typedef struct _GstAdaptiveDemuxTestCase
|
||||||
*/
|
*/
|
||||||
guint64 threshold_for_seek;
|
guint64 threshold_for_seek;
|
||||||
GstEvent *seek_event;
|
GstEvent *seek_event;
|
||||||
|
gboolean seeked;
|
||||||
|
|
||||||
gpointer signal_context;
|
gpointer signal_context;
|
||||||
} GstAdaptiveDemuxTestCase;
|
} GstAdaptiveDemuxTestCase;
|
||||||
|
|
Loading…
Reference in a new issue