1. 08 Apr, 2020 3 commits
    • Andreas Rheinhardt's avatar
      avformat/smacker: Only store what is needed later · b6ebc5ae
      Andreas Rheinhardt authored
      This commit removes data that is only used during smacker_read_header()
      from the demuxer's context and replaces the data that is used by local
      variables. The other data is completely dropped.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      b6ebc5ae
    • Andreas Rheinhardt's avatar
      avformat/smacker: Create audio streams immediately · 33bc45e4
      Andreas Rheinhardt authored
      The Smacker demuxer currently parses several fields that indicate
      how many audio streams a file contains. This data is parsed and stored
      into arrays in the demuxer's context and although the data is used only
      to initialize the audio streams, it is kept for the whole lifetime of
      the demuxer.
      
      This has been changed: The data is used directly to create
      the audio streams and no longer kept at all.
      
      This also simplifies error handling in case adding a new stream fails:
      Several arrays which until now have been allocated between parsing the
      data determining how many audio streams to create and actually creating
      them would need to be freed in this case. Now the streams are created
      first, so freeing is no longer an issue.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      33bc45e4
    • Andreas Rheinhardt's avatar
      avformat/smacker: Read extradata directly into extradata · 7885c735
      Andreas Rheinhardt authored
      The Smacker demuxer reads four consecutive 32bit values from the file
      header into its demux context (as four uint32_t), converting it to
      native endianness in the process and then writing these four values
      later (after extradata has been allocated) to extradata as four 32bit
      values (converting to little endian in the process).
      
      This commit changes this: The stream and the extradata are allocated
      earlier, so that the data destined for extradata can be read directly
      into extradata.
      
      Furthermore, given that these values are not needed for demuxing itself
      they are now no longer kept as part of the demuxing context.
      
      Finally, a check regarding the number of frames has been moved up,
      too, in order to exit early before unnecessarily allocating the
      stream and the extradata.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      7885c735
  2. 07 Apr, 2020 15 commits
  3. 06 Apr, 2020 2 commits
  4. 05 Apr, 2020 9 commits
  5. 04 Apr, 2020 11 commits