diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-06-28 18:38:37 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-07-02 10:37:22 +0200 |
commit | 8ad3267ce3a1522a181946288049cc848cc9e351 (patch) | |
tree | a100e580c3330220c753f7252317613ae12867a1 | |
parent | c8b920a9b7fa534a6141695ace4e8c2dfcd56cee (diff) | |
download | ffmpeg-8ad3267ce3a1522a181946288049cc848cc9e351.tar.gz |
oggdec: do not fall back on binary search in the generic code.
Binary search is already attempted in the format-specific seek function,
so the fallback is only reached if binary search failed already.
-rw-r--r-- | libavformat/oggdec.c | 2 | ||||
-rw-r--r-- | tests/ref/seek/lavf-ogg | 51 |
2 files changed, 35 insertions, 18 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 2ab730190c..6514c5b153 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -704,5 +704,5 @@ AVInputFormat ff_ogg_demuxer = { .read_seek = ogg_read_seek, .read_timestamp = ogg_read_timestamp, .extensions = "ogg", - .flags = AVFMT_GENERIC_INDEX, + .flags = AVFMT_GENERIC_INDEX | AVFMT_NOBINSEARCH, }; diff --git a/tests/ref/seek/lavf-ogg b/tests/ref/seek/lavf-ogg index ea8eb8bb58..109ae3226d 100644 --- a/tests/ref/seek/lavf-ogg +++ b/tests/ref/seek/lavf-ogg @@ -1,27 +1,44 @@ ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364 -ret:-1 st:-1 flags:0 ts:-1.000000 -ret:-1 st:-1 flags:1 ts: 1.894167 -ret:-1 st: 0 flags:0 ts: 0.788345 +ret: 0 st:-1 flags:0 ts:-1.000000 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364 +ret: 0 st:-1 flags:1 ts: 1.894167 +ret:-EOF +ret: 0 st: 0 flags:0 ts: 0.788345 +ret:-EOF ret:-1 st: 0 flags:1 ts:-0.317506 ret:-1 st:-1 flags:0 ts: 2.576668 -ret:-1 st:-1 flags:1 ts: 1.470835 -ret:-1 st: 0 flags:0 ts: 0.365011 +ret: 0 st:-1 flags:1 ts: 1.470835 +ret:-EOF +ret: 0 st: 0 flags:0 ts: 0.365011 +ret:-EOF ret:-1 st: 0 flags:1 ts:-0.740839 ret:-1 st:-1 flags:0 ts: 2.153336 -ret:-1 st:-1 flags:1 ts: 1.047503 -ret:-1 st: 0 flags:0 ts:-0.058322 -ret:-1 st: 0 flags:1 ts: 2.835828 +ret: 0 st:-1 flags:1 ts: 1.047503 +ret:-EOF +ret: 0 st: 0 flags:0 ts:-0.058322 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364 +ret: 0 st: 0 flags:1 ts: 2.835828 +ret:-EOF ret:-1 st:-1 flags:0 ts: 1.730004 -ret:-1 st:-1 flags:1 ts: 0.624171 -ret:-1 st: 0 flags:0 ts:-0.481655 -ret:-1 st: 0 flags:1 ts: 2.412494 +ret: 0 st:-1 flags:1 ts: 0.624171 +ret:-EOF +ret: 0 st: 0 flags:0 ts:-0.481655 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364 +ret: 0 st: 0 flags:1 ts: 2.412494 +ret:-EOF ret:-1 st:-1 flags:0 ts: 1.306672 -ret:-1 st:-1 flags:1 ts: 0.200839 -ret:-1 st: 0 flags:0 ts:-0.904989 -ret:-1 st: 0 flags:1 ts: 1.989184 -ret:-1 st:-1 flags:0 ts: 0.883340 +ret: 0 st:-1 flags:1 ts: 0.200839 +ret:-EOF +ret: 0 st: 0 flags:0 ts:-0.904989 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364 +ret: 0 st: 0 flags:1 ts: 1.989184 +ret:-EOF +ret: 0 st:-1 flags:0 ts: 0.883340 +ret:-EOF ret:-1 st:-1 flags:1 ts:-0.222493 ret:-1 st: 0 flags:0 ts: 2.671678 -ret:-1 st: 0 flags:1 ts: 1.565850 -ret:-1 st:-1 flags:0 ts: 0.460008 +ret: 0 st: 0 flags:1 ts: 1.565850 +ret:-EOF +ret: 0 st:-1 flags:0 ts: 0.460008 +ret:-EOF ret:-1 st:-1 flags:1 ts:-0.645825 |