diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5534629dd70c2f0d10f8e0871681bacd11fa2c32..df83a64a23dc7a37a3c763bcb9471f7f9c3d0d1c 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1927,6 +1927,10 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
                     if (stps_index + 1 < sc->stps_count)
                         stps_index++;
                 }
+                if (sc->keyframe_absent
+                    && !sc->stps_count
+                    && st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
+                     keyframe = 1;
                 if (keyframe)
                     distance = 0;
                 sample_size = sc->alt_sample_size > 0 ? sc->alt_sample_size : sc->sample_sizes[current_sample];