Mercurial > libavformat.hg
comparison gxfenc.c @ 1213:fe9ebf4ce09e libavformat
negative to_pad won't provoke infinite loop
author | bcoudurier |
---|---|
date | Tue, 01 Aug 2006 10:00:12 +0000 |
parents | b4f48eb1f411 |
children | 2f118b3e65c6 |
comparison
equal
deleted
inserted
replaced
1212:b4f48eb1f411 | 1213:fe9ebf4ce09e |
---|---|
115 return -1; | 115 return -1; |
116 } | 116 } |
117 | 117 |
118 static void gxf_write_padding(ByteIOContext *pb, offset_t to_pad) | 118 static void gxf_write_padding(ByteIOContext *pb, offset_t to_pad) |
119 { | 119 { |
120 while (to_pad--) { | 120 for (; to_pad > 0; to_pad--) { |
121 put_byte(pb, 0); | 121 put_byte(pb, 0); |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 static offset_t updatePacketSize(ByteIOContext *pb, offset_t pos) | 125 static offset_t updatePacketSize(ByteIOContext *pb, offset_t pos) |