lavc/get_bits: add a logging context to check_marker()

Based on d338abb664
This commit is contained in:
Clément Bœsch
2016-06-22 20:07:46 +02:00
parent 7475a9351f
commit 6c98398b0b
5 changed files with 43 additions and 41 deletions

View File

@@ -398,11 +398,12 @@ static inline unsigned int show_bits_long(GetBitContext *s, int n)
}
}
static inline int check_marker(GetBitContext *s, const char *msg)
static inline int check_marker(void *logctx, GetBitContext *s, const char *msg)
{
int bit = get_bits1(s);
if (!bit)
av_log(NULL, AV_LOG_INFO, "Marker bit missing at %d of %d %s\n", get_bits_count(s) - 1, s->size_in_bits, msg);
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;
}