Skip to content

Conversation

@cfsmp3
Copy link
Contributor

@cfsmp3 cfsmp3 commented Jan 1, 2026

Summary

Removes the TODO comment at src/lib_ccx/avc_functions.c:997 and adds a clarifying comment explaining why idr_pic_id is read but not stored.

Why idr_pic_id doesn't need to be stored:

  1. Bitstream parsing requirement: The value must be read to advance the bitstream position - subsequent fields like pic_order_cnt_lsb come after it in the slice header

  2. Not needed for caption extraction: CCExtractor uses pic_order_cnt_lsb for frame ordering (when --usepicorder is set) and PTS for timing synchronization - neither requires idr_pic_id

  3. Purpose in H.264: idr_pic_id distinguishes between consecutive IDR pictures for decoder error recovery - not relevant for extracting embedded captions from SEI NAL units

Closes #1895

🤖 Generated with Claude Code

The idr_pic_id is read to advance the bitstream position (required for
correct parsing of subsequent fields), but the value itself is not
needed for caption extraction. CCExtractor uses pic_order_cnt_lsb for
frame ordering and PTS for timing - idr_pic_id serves no purpose here.

Closes #1895

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@cfsmp3 cfsmp3 merged commit 3529bb2 into master Jan 1, 2026
38 of 40 checks passed
@cfsmp3 cfsmp3 deleted the fix/remove-idr-pic-id-todo branch January 1, 2026 12:02
@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 6dcdb4b...:
Report Name Tests Passed
Broken 13/13
CEA-708 14/14
DVB 6/7
DVD 3/3
DVR-MS 2/2
General 27/27
Hardsubx 1/1
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 86/86
Teletext 21/21
WTV 13/13
XDS 34/34

Your PR breaks these cases:

  • ccextractor --autoprogram --out=srt --latin1 --quant 0 85271be4d2...

Congratulations: Merging this PR would fix the following tests:

  • ccextractor --autoprogram --out=ttxt --latin1 --ucla dab1c1bd65..., Last passed: Never
  • ccextractor --out=srt --latin1 --autoprogram 29e5ffd34b..., Last passed: Never
  • ccextractor --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9..., Last passed: Never
  • ccextractor --startcreditsnotbefore 1 --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9..., Last passed: Never
  • ccextractor --startcreditsnotafter 2 --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9..., Last passed: Never
  • ccextractor --startcreditsforatleast 1 --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9..., Last passed: Never
  • ccextractor --startcreditsforatmost 2 --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9..., Last passed: Never

It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you).

Check the result page for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Handle idr_pic_id in AVC slice header parsing

3 participants