]> git.sesse.net Git - vlc/commit
omxil: Wait for the right event when deinitializing
authorMartin Storsjö <martin@martin.st>
Tue, 29 Jan 2013 15:55:09 +0000 (17:55 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 30 Jan 2013 14:37:51 +0000 (15:37 +0100)
commitc18a4bae88f98539c49c7e16b40d278a5db2727b
tree64400efd0558df31f04d1357bbf7a748eca51182
parente47ff3ff688d2ba42be257205dc262edf0f8af04
omxil: Wait for the right event when deinitializing

Previously, we checked that the event queue had an OMX_EventCmdComplete
item, but we didn't make sure that it was for the previously issued
OMX_CommandStateSet. In many cases, it was from a OMX_CommandFlush,
which made the code proceed with other deinitialization. If the decoder
hadn't actually transitioned to idle state yet, the buffers weren't
actually ever freed (in the state == OMX_StateIdle block), which lead
to crashes when the handle was freed at the end.

This fixes crashes when finishing playback of wmv3 videos on Galaxy S3.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/omxil/omxil.c