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:
207d9ea
)
lavf: print an error if a packet has been truncated due to filesize
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 16 Dec 2011 14:46:45 +0000
(15:46 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 16 Dec 2011 15:59:24 +0000
(16:59 +0100)
in av_get_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
379ee2b
..
76c4bf7
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-278,8
+278,10
@@
int av_get_packet(AVIOContext *s, AVPacket *pkt, int size)
remaining= s->maxsize - avio_tell(s);
}
- if(s->maxsize>=0 && remaining>=0)
- size= FFMIN(size, remaining+1);
+ if(s->maxsize>=0 && remaining>=0 && remaining+1 < size){
+ av_log(0, AV_LOG_ERROR, "Truncating packet of size %d to %"PRId64"\n", size, remaining+1);
+ size= remaining+1;
+ }
}
ret= av_new_packet(pkt, size);