diff options
Diffstat (limited to 'libavcodec/mpegvideodec.h')
-rw-r--r-- | libavcodec/mpegvideodec.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/mpegvideodec.h b/libavcodec/mpegvideodec.h index 1af8ebac36..fabc1b2202 100644 --- a/libavcodec/mpegvideodec.h +++ b/libavcodec/mpegvideodec.h @@ -29,6 +29,8 @@ #define AVCODEC_MPEGVIDEODEC_H #include "libavutil/frame.h" +#include "libavutil/log.h" + #include "avcodec.h" #include "get_bits.h" #include "mpegpicture.h" @@ -67,4 +69,14 @@ static inline int mpeg_get_qscale(MpegEncContext *s) return qscale << 1; } +static inline int check_marker(void *logctx, GetBitContext *s, const char *msg) +{ + int bit = get_bits1(s); + if (!bit) + av_log(logctx, AV_LOG_INFO, "Marker bit missing at %d of %d %s\n", + get_bits_count(s) - 1, s->size_in_bits, msg); + + return bit; +} + #endif /* AVCODEC_MPEGVIDEODEC_H */ |