Skip to content

Comments

Fix #649 ffmpeg/info.py incompatible#794

Closed
Omarabdalgwad wants to merge 6 commits intolivingbio:mainfrom
Omarabdalgwad:fix-#649-ffmpeg/info.py-incompatible
Closed

Fix #649 ffmpeg/info.py incompatible#794
Omarabdalgwad wants to merge 6 commits intolivingbio:mainfrom
Omarabdalgwad:fix-#649-ffmpeg/info.py-incompatible

Conversation

@Omarabdalgwad
Copy link
Contributor

fixes ffmpeg/info.py incompatible in different ffmpeg version

closes #649

1- i have updated parse_codec_flags to correctly parse all codec flags based on ffmpeg

flags_enum = CodecFlags(0)
    if flags[0] == "D":
        flags_enum |= CodecFlags.decoding
    if flags[1] == "E":
        flags_enum |= CodecFlags.encoding
    if flags[2] == "V":
        flags_enum |= CodecFlags.video
    if flags[3] == "A":
        flags_enum |= CodecFlags.audio
    if flags[4] == "S":
        flags_enum |= CodecFlags.subtitle
    if flags[5] == "D":
        flags_enum |= CodecFlags.data
    if flags[6] == "T":
        flags_enum |= CodecFlags.attachment
    if flags[7] == "I":
        flags_enum |= CodecFlags.intraframe_only
    if flags[8] == "L":
        flags_enum |= CodecFlags.lossy
    if flags[9] == "S":
        flags_enum |= CodecFlags.lossless
    return flags_enum

2- updated parse_coder_flags to handle encoder or decoder flags consistently

flags_enum = CoderFlags(0)
  if flags[0] == "V":
      flags_enum |= CoderFlags.video
  elif flags[0] == "A":
      flags_enum |= CoderFlags.audio
  elif flags[0] == "S":
      flags_enum |= CoderFlags.subtitle
  if flags[1] == "F":
      flags_enum |= CoderFlags.frame_level_multithreading
  if flags[2] == "S":
      flags_enum |= CoderFlags.slice_level_multithreading
  if flags[3] == "X":
      flags_enum |= CoderFlags.experimental
  if flags[4] == "B":
      flags_enum |= CoderFlags.draw_horiz_band
  if flags[5] == "D":
      flags_enum |= CoderFlags.direct_rendering_method_1
  return flags_enum
  ```

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 35.71429% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.80%. Comparing base (57852c9) to head (ab9a244).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ffmpeg/info.py 35.71% 18 Missing ⚠️

❌ Your patch status has failed because the patch coverage (35.71%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (78.80%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #794      +/-   ##
==========================================
- Coverage   78.88%   78.80%   -0.08%     
==========================================
  Files          51       51              
  Lines        3419     3425       +6     
==========================================
+ Hits         2697     2699       +2     
- Misses        722      726       +4     
Flag Coverage Δ
3.10 78.80% <35.71%> (-0.08%) ⬇️
3.11 78.77% <35.71%> (-0.08%) ⬇️
3.12 78.77% <35.71%> (-0.08%) ⬇️
backend 78.80% <35.71%> (-0.08%) ⬇️
python 78.80% <35.71%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/ffmpeg/info.py 49.36% <35.71%> (-1.32%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

ffmpeg/info.py incompatible in different ffmpeg version

1 participant