lavc/libopusdec: Allow avcodec_open2 to call .close
authorMatt Wolenetz <wolenetz@google.com>
Tue, 10 Apr 2018 20:59:25 +0000 (13:59 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 12 Apr 2018 22:35:15 +0000 (00:35 +0200)
commit9b1a4da668999c0bd4d78b370872b9448cf746c3
tree82db183cf3701484e9c5db9e62bc3770f2e2e54c
parentc9452899db109d0fe2238d9162a8fd1b315b78c4
lavc/libopusdec: Allow avcodec_open2 to call .close

If there is a decoder initialization failure detected in avcodec_open2
after .init is called, allow graceful decoder .close to prevent leaking
libopus decoder allocations.

BUG=828526

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e43e97f0e0f0596b56ceb2f887fe7414f202f081)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/libopusdec.c