From 73e8fab31dc19c4371499e612856accbc00b2820 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Thu, 13 Feb 2014 00:30:12 +0100 Subject: h264: print values in case of error Also make error style consistent and drop redundant information. --- libavcodec/h264_parser.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libavcodec/h264_parser.c') diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 05a40c76d8..b086707dbb 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -118,7 +118,8 @@ static int scan_mmco_reset(AVCodecParserContext *s) break; if (index >= h->ref_count[list]) { - av_log(h->avctx, AV_LOG_ERROR, "reference count overflow\n"); + av_log(h->avctx, AV_LOG_ERROR, + "reference count %d overflow\n", index); return AVERROR_INVALIDDATA; } } @@ -244,18 +245,18 @@ static inline int parse_nal_units(AVCodecParserContext *s, pps_id = get_ue_golomb(&h->gb); if (pps_id >= MAX_PPS_COUNT) { av_log(h->avctx, AV_LOG_ERROR, - "pps_id out of range\n"); + "pps_id %u out of range\n", pps_id); return -1; } if (!h->pps_buffers[pps_id]) { av_log(h->avctx, AV_LOG_ERROR, - "non-existing PPS referenced\n"); + "non-existing PPS %u referenced\n", pps_id); return -1; } h->pps = *h->pps_buffers[pps_id]; if (!h->sps_buffers[h->pps.sps_id]) { av_log(h->avctx, AV_LOG_ERROR, - "non-existing SPS referenced\n"); + "non-existing SPS %u referenced\n", h->pps.sps_id); return -1; } h->sps = *h->sps_buffers[h->pps.sps_id]; -- cgit v1.2.3