OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b99e85
)
ffmdec: set avio buffer to ffm->packet_size, avoid dirty reads
author
Yan Jing
<yanjng@21cn.com>
Thu, 8 Sep 2011 18:23:13 +0000
(20:23 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Thu, 8 Sep 2011 18:53:44 +0000
(20:53 +0200)
libavformat/ffmdec.c
patch
|
blob
|
history
diff --git
a/libavformat/ffmdec.c
b/libavformat/ffmdec.c
index
42c1466
..
feb136a
100644
(file)
--- a/
libavformat/ffmdec.c
+++ b/
libavformat/ffmdec.c
@@
-121,6
+121,11
@@
static int ffm_read_data(AVFormatContext *s,
if (avio_tell(pb) == ffm->file_size)
avio_seek(pb, ffm->packet_size, SEEK_SET);
retry_read:
+ if (pb->buffer_size != ffm->packet_size) {
+ int64_t tell = avio_tell(pb);
+ url_setbufsize(pb, ffm->packet_size);
+ avio_seek(pb, tell, SEEK_SET);
+ }
id = avio_rb16(pb); /* PACKET_ID */
if (id != PACKET_ID)
if (ffm_resync(s, id) < 0)