浏览代码

avformat/mov: allow seeking back to the begin even if nothing is marked as keyframe

Fixes Ticket 3663

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer 11 年之前
父节点
当前提交
96470ca22b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libavformat/mov.c

+ 1 - 1
libavformat/mov.c

@@ -2157,7 +2157,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
                 if (sc->keyframe_absent
                     && !sc->stps_count
                     && !rap_group_present
-                    && st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
+                    && (st->codec->codec_type == AVMEDIA_TYPE_AUDIO || (i==0 && j==0)))
                      keyframe = 1;
                 if (keyframe)
                     distance = 0;