OSDN Git Service

mmaldec: fix problems with flush logic
authorwm4 <nfxjfg@googlemail.com>
Tue, 8 Sep 2015 17:42:23 +0000 (19:42 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 12 Sep 2015 10:25:39 +0000 (12:25 +0200)
commit6b652c0273d79f2e0c52ad91450bd0737cf3c8a6
tree69dadd891c262b441d628fa8a3c44698f35deaaa
parentb84675d63aaede8f6944b901250a10456c5477e6
mmaldec: fix problems with flush logic

Don't try to do a blocking wait for MMAL output if we haven't even sent
a single real packet, but only flush packets. Obviously we can't expect
to get anything back.

Additionally, don't send a flush packet to MMAL in the same case. It
appears the MMAL decoder will sometimes hang in mmal_vc_port_disable()
(called from ffmmal_close_decoder()), waiting for a reply from the GPU
which never arrives. Either MMAL disallows sending flush packets without
preceding real data, or it's a MMAL bug.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/mmaldec.c