Skip to content
Snippets Groups Projects

Draft: libvlc: avoid using POSIX ssize_t in libvlc

Closed Steve Lhomme requested to merge robUx4/vlc:libvlc-ssize_t into master
  1. Mar 02, 2022
    • Steve Lhomme's avatar
      libvlc: avoid using POSIX ssize_t in libvlc · f8f228ba
      Steve Lhomme authored
      ssize_t is not a standard C type. In some cases it's supposed to hold no more
      than a long [1]. That's 2 GB in normal case which is enough for 16k*16k 16-bit
      RGBA.
      
      > The implementation shall support one or more programming environments in
      > which the widths of blksize_t, pid_t, size_t, ssize_t, and suseconds_t are no
      > greater than the width of type long. The names of these programming
      > environments can be obtained using the confstr() function or the getconf
      > utility.
      
      Changes the name of libvlc_media_new_callbacks() to
      libvlc_media_new_memory() to reflect the API change. The name is similar
      to libvlc_media_new_path(), libvlc_media_new_location(), libvlc_media_new_fd()
      and libvlc_media_new_as_node().
      
      In imem-access the callback cannot return more than LONG_MAX so we shouldn't
      ask for more.
      
      [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
      f8f228ba
    • Steve Lhomme's avatar
Loading