gstreamer/sys
Thibault Saunier 7b7a809818 v4l2dec: Fix race when going from PAUSED to READY
Running `gst-validate-launcher -t validate.file.playback.change_state_intensive.vorbis_vp8_1_webm`
on odroid XU4 (s5p-mfc v4l2 driver) often leads to:

  ERROR:../subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c:215:gst_v4l2_video_dec_stop: assertion failed: (g_atomic_int_get (&self->processing) == FALSE)

This happens when the following race happens:

- T0: Main thread
- T1: Upstream streaming thread
- T2. v4l2dec processing thread)

[The decoder is in PAUSED state]

T0. The validate scenario runs `Executing (36/40) set-state: state=null repeat=40`
T1- The decoder handles a frame
T2- A decoded frame is push downstream
T2- Downstream returns FLUSHING as it is already flushing changing state
T2- The decoder stops its processing thread and sets `->processing = FALSE`
T1- The decoder handles another frame
T1- `->process` is FALSE so the decoder restarts its streaming thread
T0- In v4l2dec-> stop the processing thread is stopped
NOTE: At this point the processing thread loop never started.
T0- assertion failed: (g_atomic_int_get (&self->processing) == FALSE)

Here I am removing the whole ->processing logic to base it all on the
GstTask state to avoid duplicating the knowledge.

https://bugzilla.gnome.org/show_bug.cgi?id=778830
2017-04-07 11:31:03 -03:00
..
directsound meson: directsound: Add ole32 library dependency 2016-10-21 06:01:16 -03:00
oss good: use new gst_element_class_add_static_pad_template() 2016-03-24 14:32:20 +02:00
oss4 Fix plugin filenames to match plugin names 2017-03-08 20:04:20 -05:00
osxaudio osxaudio: Distribute device provider files 2016-09-07 15:35:06 -04:00
osxvideo osxvideo: Remove QuickTime references. 2016-08-31 05:52:37 +10:00
sunaudio good: use new gst_element_class_add_static_pad_template() 2016-03-24 14:32:20 +02:00
v4l2 v4l2dec: Fix race when going from PAUSED to READY 2017-04-07 11:31:03 -03:00
waveform waveformsink: Fix Memory leak using GST_PTR_FORMAT 2016-10-20 13:14:10 +03:00
ximage Add support for Meson as alternative/parallel build system 2016-08-20 11:21:12 +01:00
Makefile.am v4l2: Fix typo V4L_DIR intead of V4L2_DIR 2014-03-15 18:41:16 +01:00
meson.build Add support for Meson as alternative/parallel build system 2016-08-20 11:21:12 +01:00