mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Check FindDecoder result in GIFs renderer.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user