OSDN Git Service

h264: fix deadlocks on incomplete reference frame decoding.
authorRonald S. Bultje <rsbultje@gmail.com>
Fri, 16 Mar 2012 22:24:08 +0000 (15:24 -0700)
committerRonald S. Bultje <rsbultje@gmail.com>
Fri, 16 Mar 2012 22:31:00 +0000 (15:31 -0700)
commit1e26a48fa23ef8e1cbc424667d387184d8155f15
tree6a6bdf38642bf88d192c3cd707de04bdfe1f7af8
parentc6ccb96bc955b2087ec71033d99b3dcd5203eaf2
h264: fix deadlocks on incomplete reference frame decoding.

If decoding a second complementary field, and the first was
decoded in our thread, mark decoding of that field as complete.
If decoding fails, mark the decoded field/frame as complete.
Do not allow switching between field modes or field/frame mode
between slices within the same field/frame. Ensure that two
subsequent fields cover top/bottom (rather than top/frame,
bottom/frame or such nonsense situations).

Fixes various deadlocks when decoding samples with errors in
reference frames.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
libavcodec/h264.c