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>
Showing
Please register or sign in to comment