OSDN Git Service
(root)
/
handbrake-jp
/
handbrake-jp-git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c04fb48
)
Don't abort when the ffmpeg vc1 decoder hands us a bogus packet size
author
van
<van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 18 Nov 2008 04:24:11 +0000
(
04:24
+0000)
committer
van
<van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 18 Nov 2008 04:24:11 +0000
(
04:24
+0000)
git-svn-id: svn://localhost/HandBrake/trunk@1925
b64f7644
-9d1e-0410-96f1-
a4d463321fa5
libhb/stream.c
patch
|
blob
|
history
diff --git
a/libhb/stream.c
b/libhb/stream.c
index
0a336ec
..
e531d60
100755
(executable)
--- a/
libhb/stream.c
+++ b/
libhb/stream.c
@@
-2685,6
+2685,13
@@
static int ffmpeg_read( hb_stream_t *stream, hb_buffer_t *buf )
{
if ( stream->ffmpeg_pkt->size > buf->alloc )
{
+ // sometimes we get absurd sizes from ffmpeg
+ if ( stream->ffmpeg_pkt->size >= (1 << 25) )
+ {
+ hb_log( "ffmpeg_read: pkt too big: %d bytes", stream->ffmpeg_pkt->size );
+ av_free_packet( stream->ffmpeg_pkt );
+ return ffmpeg_read( stream, buf );
+ }
// need to expand buffer
hb_buffer_realloc( buf, stream->ffmpeg_pkt->size );
}