git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2eb2ff
)
Avoid infinite loop.
author
Aurelien Jacobs
<aurel@gnuage.org>
Tue, 26 Feb 2008 22:35:07 +0000
(22:35 +0000)
committer
Aurelien Jacobs
<aurel@gnuage.org>
Tue, 26 Feb 2008 22:35:07 +0000
(22:35 +0000)
uint64_t >> 64 is an undefined operation
Originally committed as revision 12253 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/matroskaenc.c
patch
|
blob
|
history
diff --git
a/libavformat/matroskaenc.c
b/libavformat/matroskaenc.c
index
2c1f542
..
0927908
100644
(file)
--- a/
libavformat/matroskaenc.c
+++ b/
libavformat/matroskaenc.c
@@
-149,7
+149,7
@@
static void put_ebml_num(ByteIOContext *pb, uint64_t num, int bytes)
static void put_ebml_uint(ByteIOContext *pb, unsigned int elementid, uint64_t val)
{
int i, bytes = 1;
- while (val >> bytes*8) bytes++;
+ while (val >> bytes*8
&& bytes < 8
) bytes++;
put_ebml_id(pb, elementid);
put_ebml_num(pb, bytes, 0);