[vlc-commits] omxil: vout: Factorize fifo init/destroy
Martin Storsjö
git at videolan.org
Mon Jun 30 20:35:59 CEST 2014
vlc | branch: master | Martin Storsjö <martin at martin.st> | Mon Jun 30 21:18:34 2014 +0300| [24ca8ab83a34317918ef7abdf37d918612f9ee48] | committer: Martin Storsjö
omxil: vout: Factorize fifo init/destroy
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24ca8ab83a34317918ef7abdf37d918612f9ee48
---
modules/codec/omxil/vout.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/modules/codec/omxil/vout.c b/modules/codec/omxil/vout.c
index 910c93d..087fe08 100644
--- a/modules/codec/omxil/vout.c
+++ b/modules/codec/omxil/vout.c
@@ -179,10 +179,7 @@ static int Open(vlc_object_t *p_this)
p_sys->psz_component, omx_error, ErrorToString(omx_error));
InitOmxEventQueue(&p_sys->event_queue);
- vlc_mutex_init (&p_sys->port.fifo.lock);
- vlc_cond_init (&p_sys->port.fifo.wait);
- p_sys->port.fifo.offset = offsetof(OMX_BUFFERHEADERTYPE, pOutputPortPrivate) / sizeof(void *);
- p_sys->port.fifo.pp_last = &p_sys->port.fifo.p_first;
+ OMX_FIFO_INIT(&p_sys->port.fifo, pOutputPortPrivate);
p_sys->port.b_direct = false;
p_sys->port.b_flushed = true;
@@ -373,8 +370,7 @@ static void Close(vlc_object_t *p_this)
free(p_sys->port.pp_buffers);
pf_free_handle(p_sys->omx_handle);
DeinitOmxEventQueue(&p_sys->event_queue);
- vlc_mutex_destroy(&p_sys->port.fifo.lock);
- vlc_cond_destroy(&p_sys->port.fifo.wait);
+ OMX_FIFO_DESTROY(&p_sys->port.fifo);
}
if (p_sys->pool)
More information about the vlc-commits
mailing list