GST_DEBUG_OBJECT (comp->parent, "Port %u emptied buffer %p",
port->index, buf);
buf->used = FALSE;
+
+ if (comp->hacks & GST_OMX_HACK_NO_NOFFSET_RESET) {
+ g_assert (buf->omx_buf->nFilledLen == 0);
+ buf->omx_buf->nOffset = 0;
+ }
+
g_queue_push_tail (port->pending_buffers, buf);
g_cond_broadcast (port->port_cond);
g_mutex_unlock (port->port_lock);
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, "no-noffset-reset"))
+ hacks_flags |= GST_OMX_HACK_NO_NOFFSET_RESET;
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)
+/* If the nOffset field of buffers is not reset in EmptyBufferDone.
+ * Happens with Qualcomm's OpenMAX implementation.
+ */
+#define GST_OMX_HACK_NO_NOFFSET_RESET G_GUINT64_CONSTANT (0x0000000000000010)
+
typedef struct _GstOMXCore GstOMXCore;
typedef struct _GstOMXPort GstOMXPort;