322 ASSERT_BUFFER_REFCOUNT (buffer3, "buffer", 1); |
322 ASSERT_BUFFER_REFCOUNT (buffer3, "buffer", 1); |
323 TEST_ASSERT_FAIL |
323 TEST_ASSERT_FAIL |
324 /* pushing gives away my reference ... */ |
324 /* pushing gives away my reference ... */ |
325 gst_pad_push (mysrcpad, gst_buffer_ref (buffer3)); |
325 gst_pad_push (mysrcpad, gst_buffer_ref (buffer3)); |
326 |
326 |
327 //g_mutex_lock (check_mutex); |
327 g_mutex_lock (check_mutex); |
328 /* start the src-task briefly leak buffer3 */ |
328 /* start the src-task briefly leak buffer3 */ |
329 gst_pad_set_active (mysinkpad, TRUE); |
329 gst_pad_set_active (mysinkpad, TRUE); |
330 //g_cond_wait (check_cond, check_mutex); |
330 g_cond_wait (check_cond, check_mutex); |
331 //g_mutex_unlock (check_mutex); |
331 g_mutex_unlock (check_mutex); |
332 /// wait for second thread to read buffer. |
332 /// wait for second thread to read buffer. |
333 sleep(2); |
333 //sleep(2); |
334 gst_pad_set_active (mysinkpad, FALSE); |
334 gst_pad_set_active (mysinkpad, FALSE); |
335 |
335 |
336 GST_DEBUG ("stopping"); |
336 GST_DEBUG ("stopping"); |
337 |
337 |
338 fail_unless (g_list_length (buffers) > 0); |
338 fail_unless (g_list_length (buffers) > 0); |
414 ASSERT_BUFFER_REFCOUNT (buffer3, "buffer", 1); |
414 ASSERT_BUFFER_REFCOUNT (buffer3, "buffer", 1); |
415 TEST_ASSERT_FAIL |
415 TEST_ASSERT_FAIL |
416 /* pushing gives away my reference ... */ |
416 /* pushing gives away my reference ... */ |
417 gst_pad_push (mysrcpad, buffer3); |
417 gst_pad_push (mysrcpad, buffer3); |
418 |
418 |
419 //g_mutex_lock (check_mutex); |
419 g_mutex_lock (check_mutex); |
420 /* start the src-task briefly and leak buffer1 */ |
420 /* start the src-task briefly and leak buffer1 */ |
421 gst_pad_set_active (mysinkpad, TRUE); |
421 gst_pad_set_active (mysinkpad, TRUE); |
422 //g_cond_wait (check_cond, check_mutex); |
422 g_cond_wait (check_cond, check_mutex); |
423 //g_mutex_unlock (check_mutex); |
423 g_mutex_unlock (check_mutex); |
424 sleep(2); |
424 //sleep(2); |
425 gst_pad_set_active (mysinkpad, FALSE); |
425 gst_pad_set_active (mysinkpad, FALSE); |
426 |
426 |
427 GST_DEBUG ("stopping"); |
427 GST_DEBUG ("stopping"); |
428 |
428 |
429 fail_unless (g_list_length (buffers) > 0); |
429 fail_unless (g_list_length (buffers) > 0); |