if (port->port_def.eDir == OMX_DirOutput && port->buffers) {
GstOMXBuffer *buf;
- /* FIXME: Workaround for QCOM 7x30 race condition */
- g_usleep (G_USEC_PER_SEC / 10);
+ if (comp->hacks & GST_OMX_HACK_QCOM_7x30_FILL_THIS_BUFFER_RACE)
+ g_usleep (G_USEC_PER_SEC / 10);
/* Enqueue all buffers for the component to fill */
while ((buf = g_queue_pop_head (port->pending_buffers))) {
if (enabled && port->port_def.eDir == OMX_DirOutput) {
GstOMXBuffer *buf;
+ if (comp->hacks & GST_OMX_HACK_QCOM_7x30_FILL_THIS_BUFFER_RACE)
+ g_usleep (G_USEC_PER_SEC / 10);
+
/* Enqueue all buffers for the component to fill */
while ((buf = g_queue_pop_head (port->pending_buffers))) {
g_assert (!buf->used);
hacks_flags |= GST_OMX_HACK_VIDEO_FRAMERATE_INTEGER;
else if (g_str_equal (*hacks, "syncframe-flag-not-used"))
hacks_flags |= GST_OMX_HACK_SYNCFRAME_FLAG_NOT_USED;
+ else if (g_str_equal (*hacks, "qcom-7x30-fill-this-buffer-race"))
+ hacks_flags |= GST_OMX_HACK_QCOM_7x30_FILL_THIS_BUFFER_RACE;
else
GST_WARNING ("Unknown hack: %s", *hacks);
hacks++;
* Happens with the Bellagio ffmpegdist video encoder.
*/
#define GST_OMX_HACK_SYNCFRAME_FLAG_NOT_USED G_GUINT64_CONSTANT (0x0000000000000008)
+/* Qualcomm 7x30 sometimes fails with an undefined error after
+ * allocating buffers, setting the state to Idle when calling
+ * OMX_FillThisBuffer() on all output buffers too early.
+ */
+#define GST_OMX_HACK_QCOM_7x30_FILL_THIS_BUFFER_RACE G_GUINT64_CONSTANT (0x0000000000000010)
+
typedef struct _GstOMXCore GstOMXCore;
typedef struct _GstOMXPort GstOMXPort;