<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">You may be right…</div><div class=""><br class=""></div><div class="">If you check ITU H264 (04/2017) (I can make this document available to you if you don’t have it)</div><div class=""><br class=""></div><div class=""><div>
<div class="page" title="Page 72">
<div class="layoutArea">
<div class="column"><p class=""><span style="font-size: 10.000000pt; font-family: 'TimesNewRomanPS'; font-weight: 700" class="">7.3.2.13 </span><span style="font-family: TimesNewRomanPS; font-size: 10pt; font-weight: 700;" class="">Slice layer extension RBSP syntax</span></p></div><div class="column"><div class="">there you’ll find the whole slice header syntax.</div><div class=""><br class=""></div><div class="">What ffmpeg calls <span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">reordering_of_pic_nums_idc </span>is in the spec num_ref_idx_10_active_minus1, per the spec, that value is either between 0-7 or 0-15.. There’s an exception where it can be 0 to 31. So anything over 31 would be an error</div><div class=""><br class=""></div><div class="">You should ask that in #ffmpeg-devel</div><div class=""><br class=""></div><div class="">JY</div><div class=""><br class=""></div>
</div>
</div>
</div><blockquote type="cite" class=""><div class="">On 25 Apr 2018, at 9:14 pm, John Pilkington <<a href="mailto:johnpilk222@gmail.com" class="">johnpilk222@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello: When I feed h264 from UK DVB-T2 recordings into ffmpeg I almost always get error reports of 'illegal reordering of pic_nums_idc' or 'reference count overflow.' I'm running 30-pre-579<br class=""><br class="">These reports apparently come from libavcodec/h264_parser.c, lines 186 and 194, and the if/else if combination at lines 182/184 looks very strange.<br class=""><br class=""> unsigned int reordering_of_pic_nums_idc = get_ue_golomb_31(gb);<br class=""><br class=""> if (reordering_of_pic_nums_idc < 3)<br class=""> get_ue_golomb_long(gb);<br class=""> else if (reordering_of_pic_nums_idc > 3) {<br class=""><br class="">while libavcodec/golomb.h has this at line 82:<br class=""><br class="">/**<br class=""> * read unsigned exp golomb code, constraint to a max of 31.<br class=""> * the return value is undefined if the stored value exceeds 31.<br class=""> */<br class="">static inline int get_ue_golomb_31(GetBitContext *gb)<br class="">{<br class=""><br class="">I think that the '3' in the 'else if' line in the parser should be 31; any comments? Suggested action? I haven't yet tried a patch.<br class=""><br class="">John P<br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">mythtv-dev mailing list<br class=""><a href="mailto:mythtv-dev@mythtv.org" class="">mythtv-dev@mythtv.org</a><br class="">http://lists.mythtv.org/mailman/listinfo/mythtv-dev<br class="">http://wiki.mythtv.org/Mailing_List_etiquette<br class="">MythTV Forums: https://forum.mythtv.org<br class=""></div></div></blockquote></div><br class=""></div></body></html>