Skip to content
Snippets Groups Projects
  1. Feb 12, 2025
  2. Feb 11, 2025
  3. Feb 10, 2025
  4. Feb 07, 2025
  5. Feb 03, 2025
    • Carlos Bentzen's avatar
      cdg: fix typefind error with specific file sizes · 7e2a4cf6
      Carlos Bentzen authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      Currently, the typefind logic for cdg can cause errors on files
      with all conditions below:
      - size multiple of NB_WINDOWS * CDG_PACKET_SIZE (8 * 24) = 192
      - size less than TYPEFIND_SEARCH_WINDOW (28800)
      - extension different than .cdg
      
      With those conditions, the cdg typefind function may be the last one to
      execute and cause gsttypefindhelper.c::helper_find_peek to return
      GST_FLOW_EOS, and if it's the final call will then be turned to
      GST_FLOW_ERROR in typefind.
      
      That is because cdg's typefind will perform a last call to
      typefind.peek(len, CDG_PACKET_SIZE) which is outside the range of typefind
      (from 0 to len - 1).
      
      Reproducer with file from cdg tests:
      ```
      head -n 28608 BrotherJohn.cdg > BrotherJohn_short.bit
      gst-play-1.0 BrotherJohn_short.bit
      ```
      
      Fix this by correcting the loop bounds in the cdg typefind
      logic. Perhaps the typefind helper logic should be rewritten to avoid
      such cases too.
      
      Then the example above works and unrelated files aren't affected by this
      in typefind anymore.
      
      Part-of: <!2056>
      7e2a4cf6
  6. Jan 31, 2025
  7. Jan 30, 2025
  8. Jan 28, 2025
  9. Jan 21, 2025
  10. Jan 20, 2025
  11. Jan 16, 2025
  12. Jan 15, 2025
  13. Jan 14, 2025
Loading