mirror of https://github.com/FFmpeg/FFmpeg.git
When allocating FFV1 slice contexts fails, ff_ffv1_init_slice_contexts() frees everything that it has allocated, yet it does not reset the counter for the number of allocated slice contexts. This inconsistent state leads to segfaults lateron in ff_ffv1_close(), because said function presumes that the slice contexts have been allocated. Fix this by making sure that the number of slice contexts on error is consistent (namely zero). (This issue only affected the FFV1 decoder, because the encoder does not clean up after itself on init failure.) Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>pull/351/head
parent
8de4a132ff
commit
a0750f412a
1 changed files with 4 additions and 4 deletions
Loading…
Reference in new issue