diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-08-01 03:03:20 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-08-01 15:04:51 +0200 |
commit | fa14804c83a7108a50c63d1f2180e30c75909529 (patch) | |
tree | 2048c9ed15231da9c840a4674d28076af56f7fd9 /libavformat | |
parent | 7ab551f9fd9a63586649a7df8790ddaeac55420f (diff) | |
download | ffmpeg-fa14804c83a7108a50c63d1f2180e30c75909529.tar.gz |
flv: Index the audio stream
And leverage the video index if the video is just disabled as wm4
did in an initial patch.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flvdec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 8e4cc5e09d..034e3468ce 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -818,6 +818,11 @@ skip: st = create_stream(s, is_audio ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO); av_dlog(s, "%d %X %d \n", is_audio, flags, st->discard); + + if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY || + is_audio) + av_add_index_entry(st, pos, dts, size, 0, AVINDEX_KEYFRAME); + if ((st->discard >= AVDISCARD_NONKEY && !((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY || is_audio)) || (st->discard >= AVDISCARD_BIDIR && @@ -826,8 +831,6 @@ skip: avio_seek(s->pb, next, SEEK_SET); continue; } - if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY) - av_add_index_entry(st, pos, dts, size, 0, AVINDEX_KEYFRAME); break; } |