summaryrefslogtreecommitdiff
path: root/libavformat/mpegts.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-03-01 13:01:43 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-03-04 11:45:31 +0100
commit5397386effba2e53e4ff82852a86f6be4d59e9c1 (patch)
treec6a1f3a2b99d3e8292dcd64e2e333484232320f7 /libavformat/mpegts.c
parent61b323ce7c7cdc101eadfd7de2203922b8a39e8d (diff)
mathops: move macro to the only place it is used
This helps in disentangling lavf and lavc too.
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 5962592202..5a3561f588 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -28,7 +28,6 @@
#include "libavutil/opt.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/get_bits.h"
-#include "libavcodec/mathops.h"
#include "avformat.h"
#include "mpegts.h"
#include "internal.h"
@@ -45,6 +44,13 @@
#define MAX_MP4_DESCR_COUNT 16
+#define MOD_UNLIKELY(modulus, dividend, divisor, prev_dividend) \
+ do { \
+ if ((prev_dividend) == 0 || (dividend) - (prev_dividend) != (divisor)) \
+ (modulus) = (dividend) % (divisor); \
+ (prev_dividend) = (dividend); \
+ } while (0)
+
enum MpegTSFilterType {
MPEGTS_PES,
MPEGTS_SECTION,