avcodec/encoder: fix leak in case of codec opening failure
commitf69475d477e6c597a47b8bc55ee61fdf2ec23f02
authorAlexandre Janniaux <alexandre.janniaux@gmail.com>
Thu, 6 Dec 2018 20:36:07 +0000 (6 21:36 +0100)
committerTristan Matthews <tmatth@videolan.org>
Thu, 6 Dec 2018 20:48:19 +0000 (6 15:48 -0500)
tree2e345b9882d54637e4da4d26663c80677377814f
parent2c0fa9d11015301b0fbb79ba2d831e86135382e5
avcodec/encoder: fix leak in case of codec opening failure

If the required codec is invalid or doesn't match the required codec id,
we must release the string obtained from var_GetString.

Signed-off-by: Tristan Matthews <tmatth@videolan.org>
modules/codec/avcodec/encoder.c