зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1226707: [ffmpeg] P1. Delete codec context upon initialization failure. r=gerald
This commit is contained in:
Родитель
81ca4c4489
Коммит
ef21ca8081
|
@ -117,6 +117,8 @@ FFmpegDataDecoder<LIBAV_VER>::InitDecoder()
|
|||
|
||||
if (avcodec_open2(mCodecContext, codec, nullptr) < 0) {
|
||||
NS_WARNING("Couldn't initialise ffmpeg decoder");
|
||||
avcodec_close(mCodecContext);
|
||||
av_freep(&mCodecContext);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче