OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9600486
)
avformat/mp3dec: optimize mp3_seek() for dir < 0
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 1 Mar 2014 23:18:25 +0000
(
00:18
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 1 Mar 2014 23:20:31 +0000
(
00:20
+0100)
this minimizes the amount of protocol seeks and reading needed in that case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mp3dec.c
patch
|
blob
|
history
diff --git
a/libavformat/mp3dec.c
b/libavformat/mp3dec.c
index
c1ce173
..
ba77bce
100644
(file)
--- a/
libavformat/mp3dec.c
+++ b/
libavformat/mp3dec.c
@@
-318,6
+318,8
@@
static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
return -1;
}
+ if (dir < 0)
+ avio_seek(s->pb, FFMAX(ie->pos - 4096, 0), SEEK_SET);
ret = avio_seek(s->pb, ie->pos, SEEK_SET);
if (ret < 0)
return ret;