[Bug 787290] GST_EVENT_FLUSH_START for omxvideodec

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Sep 6 08:56:20 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=787290

--- Comment #2 from Yuji Kuwabara <HHG01200 at nifty.ne.jp> ---
1.
 I have tried a Pad Probe on src of GstOMXVideoDec.
It forwards GST_EVENT_FLUSH_START, then call klass->flush().
Unfortunately, this makes GstOMXVideoDec malfunction.


2.
 I have tried to modify gstvideodecoder.c (just for convenience).
In gst_video_decoder_sink_event_default(), I added a handler for
GST_EVENT_FLUSH_START.
It does same as GST_EVENT_FLUSH_STOP.
-------------------------------------------------------
    case GST_EVENT_FLUSH_START:
    {
      ret = gst_video_decoder_push_event (decoder, event);

      GList *l;

      GST_VIDEO_DECODER_STREAM_LOCK (decoder);

     for (l = priv->frames; l; l = l->next) {
        GstVideoCodecFrame *frame = l->data;

        frame->events = _flush_events (decoder->srcpad, frame->events);
      }
      priv->current_frame_events = _flush_events (decoder->srcpad,
          decoder->priv->current_frame_events);

      gst_video_decoder_flush (decoder, TRUE );
      GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);

    return TRUE;
    }
-------------------------------------------------------
This prevents infinite stuck in gst_element_seek().
Unfortunately, this makes some memory corruption (finally crash).


3.
 I changed argument of gst_video_decoder_flush() to not "hard". 
-------------------------------------------------------
    case GST_EVENT_FLUSH_START:
    {
      ret = gst_video_decoder_push_event (decoder, event);

      GList *l;

      GST_VIDEO_DECODER_STREAM_LOCK (decoder);

     for (l = priv->frames; l; l = l->next) {
        GstVideoCodecFrame *frame = l->data;

        frame->events = _flush_events (decoder->srcpad, frame->events);
      }
      priv->current_frame_events = _flush_events (decoder->srcpad,
          decoder->priv->current_frame_events);

      gst_video_decoder_flush (decoder, FALSE /*TRUE*/ );
      GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);

    return TRUE;
    }
-------------------------------------------------------
This works ALMOST fine.
After many successive seek() operations, the pipeline stucks for 5 seconds (NOT
infinite!),
then log message is shown.
-------------------------------------------------------
0:01:00.216696122 29704 0x6c602030 ERROR                    omx
gstomx.c:1978:gst_omx_port_wait_buffers_released_unlocked:<omxh264dec-omxh264dec2>
Timeout waiting for egl_render port 221 to release all buffers
0:01:00.217750909 29704   0x20fac0 ERROR                    omx
gstomx.c:836:gst_omx_component_set_state:<omxh264dec-omxh264dec2> Last
operation returned an error. Setting last_error manually.
0:01:00.217836117 29704   0x20fac0 ERROR                    omx
gstomx.c:845:gst_omx_component_set_state:<omxh264dec-omxh264dec2> Error setting
egl_render state from 4 to 3: Insufficient resources (0x80001000)
0:01:00.217935075 29704   0x20fac0 ERROR                    omx
gstomx.c:872:gst_omx_component_get_state:<omxh264dec-omxh264dec2> Component
egl_render in error state: Insufficient resources (0x80001000)
0:01:00.218269448 29704   0x20fac0 ERROR                    omx
gstomx.c:1490:gst_omx_port_set_flushing:<omxh264dec-omxh264dec2> Component
egl_render is in error state: Insufficient resources (0x80001000)
0:01:00.218475437 29704   0x20fac0 ERROR                    omx
gstomx.c:1490:gst_omx_port_set_flushing:<omxh264dec-omxh264dec2> Component
egl_render is in error state: Insufficient resources (0x80001000)
0:01:00.219939493 29704   0x20fac0 ERROR                    omx
gstomx.c:872:gst_omx_component_get_state:<omxh264dec-omxh264dec2> Component
egl_render in error state: Insufficient resources (0x80001000)
0:01:00.221063759 29704   0x20fac0 ERROR                    omx
gstomx.c:845:gst_omx_component_set_state:<omxh264dec-omxh264dec2> Error setting
egl_render state from 4 to 3: Insufficient resources (0x80001000)
0:01:00.221159123 29704   0x20fac0 ERROR                    omx
gstomx.c:872:gst_omx_component_get_state:<omxh264dec-omxh264dec2> Component
egl_render in error state: Insufficient resources (0x80001000)
0:01:00.221491309 29704   0x20fac0 ERROR                    omx
gstomx.c:1490:gst_omx_port_set_flushing:<omxh264dec-omxh264dec2> Component
egl_render is in error state: Insufficient resources (0x80001000)
0:01:00.221705266 29704   0x20fac0 ERROR                    omx
gstomx.c:1490:gst_omx_port_set_flushing:<omxh264dec-omxh264dec2> Component
egl_render is in error state: Insufficient resources (0x80001000)
0:01:00.225268271 29704 0x6c602030 ERROR                    omx
gstomx.c:1263:gst_omx_port_acquire_buffer:<omxh264dec-omxh264dec2> Component
egl_render is in error state: Insufficient resources
-------------------------------------------------------
I allocated 512MB for VRAM.
bcmstat.sh shows free VRAM around 80%.
I think there are enough free VRAM.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list