aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-17 15:08:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-17 15:08:50 +0100
commit69a96f9d4cf6d5a7f5b568c713b48d78452838fd (patch)
tree9370b707272cff78233a18445ce1151998f7c636
parentc57c1329a9958c7eae1c9388fac673f0df53ae13 (diff)
downloadffmpeg-69a96f9d4cf6d5a7f5b568c713b48d78452838fd.tar.gz
mux: de-obfuscate chunked interleaver checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 0648b3f8c0..ccb1530d78 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -553,8 +553,8 @@ int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
uint64_t max= av_rescale_q_rnd(s->max_chunk_duration, AV_TIME_BASE_Q, st->time_base, AV_ROUND_UP);
st->interleaver_chunk_size += pkt->size;
st->interleaver_chunk_duration += pkt->duration;
- if ( st->interleaver_chunk_size > s->max_chunk_size-1U
- || st->interleaver_chunk_duration > max-1U) {
+ if ( (s->max_chunk_size && st->interleaver_chunk_size > s->max_chunk_size)
+ || (max && st->interleaver_chunk_duration > max)) {
st->interleaver_chunk_size =
st->interleaver_chunk_duration = 0;
this_pktl->pkt.flags |= CHUNK_START;