nalutils: Improve slightly the error trace
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 19 Jun 2020 16:15:53 +0000 (12:15 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 20 Jun 2020 19:47:49 +0000 (19:47 +0000)
commitc213b6ea1703049745fa55c54a7eac713890dc8e
treecf5170c97f757932135847143b7946e782772469
parent434d685564b50d0db6778e83cad6de942a50463d
nalutils: Improve slightly the error trace

Until now, bound check would simply trace the values and the range. This
enhances the trace by also tracing the name of the variable that was to be set
or read. This is not magically perfect in all cases, but greatly speed the
debugging work. Here's an example before and after this change:

Before: gst_h264_parser_parse_slice_hdr: value not in allowed range. value: 819183, range -87-77
After:  gst_h264_parser_parse_slice_hdr: value for 'slice->slice_qp_delta' not in allowed range. value: 819183, range -87-77
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1356>
gst-libs/gst/codecparsers/nalutils.h