mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
accel: don't crash on fallback
If no accel is found in getFormatCb, accel->codecCtx_ is null, and segfaults. Change-Id: Ibe3b246aaa0620f2dd5b91d2864fff65b6e8b794
This commit is contained in:

committed by
Adrien Béraud

parent
04ee614fba
commit
56a78bfbe8
@ -116,8 +116,10 @@ HardwareAccel::fail(bool forceFallback)
|
||||
fallback_ = true;
|
||||
allocationFails_ = 0;
|
||||
extractionFails_ = 0;
|
||||
codecCtx_->get_format = avcodec_default_get_format;
|
||||
codecCtx_->get_buffer2 = avcodec_default_get_buffer2;
|
||||
if (codecCtx_) {
|
||||
codecCtx_->get_format = avcodec_default_get_format;
|
||||
codecCtx_->get_buffer2 = avcodec_default_get_buffer2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user