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.
This commit is contained in:
Anton Khirnov 2013-06-28 18:38:37 +02:00
parent c8b920a9b7
commit 8ad3267ce3
2 changed files with 35 additions and 18 deletions

View File

@ -704,5 +704,5 @@ AVInputFormat ff_ogg_demuxer = {
.read_seek = ogg_read_seek, .read_seek = ogg_read_seek,
.read_timestamp = ogg_read_timestamp, .read_timestamp = ogg_read_timestamp,
.extensions = "ogg", .extensions = "ogg",
.flags = AVFMT_GENERIC_INDEX, .flags = AVFMT_GENERIC_INDEX | AVFMT_NOBINSEARCH,
}; };

View File

@ -1,27 +1,44 @@
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364 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: 0 st:-1 flags:0 ts:-1.000000
ret:-1 st:-1 flags:1 ts: 1.894167 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364
ret:-1 st: 0 flags:0 ts: 0.788345 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: 0 flags:1 ts:-0.317506
ret:-1 st:-1 flags:0 ts: 2.576668 ret:-1 st:-1 flags:0 ts: 2.576668
ret:-1 st:-1 flags:1 ts: 1.470835 ret: 0 st:-1 flags:1 ts: 1.470835
ret:-1 st: 0 flags:0 ts: 0.365011 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: 0 flags:1 ts:-0.740839
ret:-1 st:-1 flags:0 ts: 2.153336 ret:-1 st:-1 flags:0 ts: 2.153336
ret:-1 st:-1 flags:1 ts: 1.047503 ret: 0 st:-1 flags:1 ts: 1.047503
ret:-1 st: 0 flags:0 ts:-0.058322 ret:-EOF
ret:-1 st: 0 flags:1 ts: 2.835828 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:0 ts: 1.730004
ret:-1 st:-1 flags:1 ts: 0.624171 ret: 0 st:-1 flags:1 ts: 0.624171
ret:-1 st: 0 flags:0 ts:-0.481655 ret:-EOF
ret:-1 st: 0 flags:1 ts: 2.412494 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:0 ts: 1.306672
ret:-1 st:-1 flags:1 ts: 0.200839 ret: 0 st:-1 flags:1 ts: 0.200839
ret:-1 st: 0 flags:0 ts:-0.904989 ret:-EOF
ret:-1 st: 0 flags:1 ts: 1.989184 ret: 0 st: 0 flags:0 ts:-0.904989
ret:-1 st:-1 flags:0 ts: 0.883340 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:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.671678 ret:-1 st: 0 flags:0 ts: 2.671678
ret:-1 st: 0 flags:1 ts: 1.565850 ret: 0 st: 0 flags:1 ts: 1.565850
ret:-1 st:-1 flags:0 ts: 0.460008 ret:-EOF
ret: 0 st:-1 flags:0 ts: 0.460008
ret:-EOF
ret:-1 st:-1 flags:1 ts:-0.645825 ret:-1 st:-1 flags:1 ts:-0.645825