summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index efe151530..c3d32bc75 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -266,6 +266,10 @@ deinterleave_audio(AVFrame* frame)
auto audio = make_shared<AudioBuffers>(channels, frames);
auto data = audio->data();
+ if (frames == 0) {
+ return audio;
+ }
+
switch (format) {
case AV_SAMPLE_FMT_U8:
{