mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +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,10 +175,12 @@ gst_adaptive_demux_test_check_received_data (GstAdaptiveDemuxTestEngine *
|
|||
(guint64) gst_buffer_get_size (buffer),
|
||||
testOutputStreamData->expected_size, stream->segment_start);
|
||||
|
||||
fail_unless (stream->total_received_size +
|
||||
stream->segment_received_size +
|
||||
gst_buffer_get_size (buffer) <= testOutputStreamData->expected_size,
|
||||
"Received unexpected data, please check what segments are being downloaded");
|
||||
/* Only verify after seeking */
|
||||
if (testData->seek_event && testData->seeked)
|
||||
fail_unless (stream->total_received_size +
|
||||
stream->segment_received_size +
|
||||
gst_buffer_get_size (buffer) <= testOutputStreamData->expected_size,
|
||||
"Received unexpected data, please check what segments are being downloaded");
|
||||
|
||||
streamOffset = stream->segment_start + stream->segment_received_size;
|
||||
if (testOutputStreamData->expected_data) {
|
||||
|
@ -357,6 +359,7 @@ testSeekAdaptiveDemuxSendsData (GstAdaptiveDemuxTestEngine * engine,
|
|||
g_cond_wait (&testData->test_task_state_cond,
|
||||
&testData->test_task_state_lock);
|
||||
}
|
||||
testData->seeked = TRUE;
|
||||
g_mutex_unlock (&testData->test_task_state_lock);
|
||||
/* we can continue now, but this buffer will be rejected by AppSink
|
||||
* because it is in flushing mode
|
||||
|
|
|
@ -113,6 +113,7 @@ typedef struct _GstAdaptiveDemuxTestCase
|
|||
*/
|
||||
guint64 threshold_for_seek;
|
||||
GstEvent *seek_event;
|
||||
gboolean seeked;
|
||||
|
||||
gpointer signal_context;
|
||||
} GstAdaptiveDemuxTestCase;
|
||||
|
|
Loading…
Reference in a new issue