mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Check FindDecoder result in GIFs renderer.
This commit is contained in:
parent
2dd01ed09f
commit
5f027d7c87
1 changed files with 4 additions and 0 deletions
|
@ -335,6 +335,10 @@ bool FFMpegReaderImplementation::start(Mode mode, crl::time &positionMs) {
|
|||
av_opt_set_int(_codecContext, "refcounted_frames", 1, 0);
|
||||
|
||||
const auto codec = FFmpeg::FindDecoder(_codecContext);
|
||||
if (!codec) {
|
||||
LOG(("Gif Error: Unable to avcodec_find_decoder %1").arg(logData()));
|
||||
return false;
|
||||
}
|
||||
if (_mode == Mode::Inspecting) {
|
||||
const auto audioStreamId = av_find_best_stream(_fmtContext, AVMEDIA_TYPE_AUDIO, -1, -1, nullptr, 0);
|
||||
_hasAudioStream = (audioStreamId >= 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue