[FFmpeg-cvslog] flvdec: remove incomplete, disabled seeking code

Ronald S. Bultje git at videolan.org
Tue Jun 19 21:13:53 CEST 2012


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Mon Jun 18 15:22:15 2012 +0100| [8703f0140f89bb761e9b158978aee51d90d5293d] | committer: Mans Rullgard

flvdec: remove incomplete, disabled seeking code

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8703f0140f89bb761e9b158978aee51d90d5293d
---

 libavformat/flvdec.c |   30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index f04f4fe..8e9759b 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -749,33 +749,6 @@ static int flv_read_seek(AVFormatContext *s, int stream_index,
     return avio_seek_time(s->pb, stream_index, ts, flags);
 }
 
-#if 0 /* don't know enough to implement this */
-static int flv_read_seek2(AVFormatContext *s, int stream_index,
-    int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
-{
-    int ret = AVERROR(ENOSYS);
-
-    if (ts - min_ts > (uint64_t)(max_ts - ts)) flags |= AVSEEK_FLAG_BACKWARD;
-
-    if (!s->pb->seekable) {
-        if (stream_index < 0) {
-            stream_index = av_find_default_stream_index(s);
-            if (stream_index < 0)
-                return -1;
-
-            /* timestamp for default must be expressed in AV_TIME_BASE units */
-            ts = av_rescale_rnd(ts, 1000, AV_TIME_BASE,
-                flags & AVSEEK_FLAG_BACKWARD ? AV_ROUND_DOWN : AV_ROUND_UP);
-        }
-        ret = avio_seek_time(s->pb, stream_index, ts, flags);
-    }
-
-    if (ret == AVERROR(ENOSYS))
-        ret = av_seek_frame(s, stream_index, ts, flags);
-    return ret;
-}
-#endif
-
 AVInputFormat ff_flv_demuxer = {
     .name           = "flv",
     .long_name      = NULL_IF_CONFIG_SMALL("FLV format"),
@@ -784,9 +757,6 @@ AVInputFormat ff_flv_demuxer = {
     .read_header    = flv_read_header,
     .read_packet    = flv_read_packet,
     .read_seek      = flv_read_seek,
-#if 0
-    .read_seek2     = flv_read_seek2,
-#endif
     .read_close     = flv_read_close,
     .extensions     = "flv",
 };



More information about the ffmpeg-cvslog mailing list