1. 15 Jun, 2020 5 commits
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Use right number of tracks · 0260352d
      Andreas Rheinhardt authored
      When demuxing a Matroska/WebM file, streams are added for tracks and for
      attachments, so that the array containing the former can be NULL even
      when the corresponding AVFormatContext has streams. So check for there
      to be tracks in the MatroskaDemuxContext instead of just streams in the
      AVFormatContext before dereferencing the pointer to the tracks.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      (cherry picked from commit 1ef30571a0a7150cb20c580bfc52af2a7101c20d)
      0260352d
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Fix handling gigantic durations · a2ab8bab
      Andreas Rheinhardt authored
      matroska_parse_block currently asserts that the duration is not equal to
      AV_NOPTS_VALUE, but there is nothing that actually guarantees this. It
      is easy to create (spec-compliant) files which run into this assert;
      so replace it and instead cap the duration to INT64_MAX, as the duration
      field of an AVPacket is an int64_t.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      (cherry picked from commit 3714d452b894821591a2fbafdd1b8ef15abe4be6)
      a2ab8bab
    • Andreas Rheinhardt's avatar
      avformat/matroskadec: Move AVBufferRef instead of copying, fix memleak · 751f2851
      Andreas Rheinhardt authored
      EBML binary elements are already made reference-counted when read;
      so when populating the AVStream.attached_pic, one does not need to
      allocate a new buffer for the data; instead the current code just
      creates a new reference to the underlying AVBuffer. But this can be
      improved even further: Just move the already existing reference.
      
      This also fixes a memleak that happens upon error because
      matroska_read_close has not been called in this scenario.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      (cherry picked from commit cbe336c9e81e2d9de3a18abef887c9255a9b9da5)
      751f2851
    • Andreas Rheinhardt's avatar
      avformat/hlsenc: Always treat numbers as decimal · 2c738c75
      Andreas Rheinhardt authored
      c801ab43 caused a regression: The stream
      number is now parsed with strtoll without a fixed basis; as a
      consequence, the "010" in a variant stream mapping like "a:010" is now
      treated as an octal number (i.e. as eight, not ten). This was not
      intended and may break some scripts, so this commit restores the old
      behaviour.
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      (cherry picked from commit 19a876fd6973724521dd5e7cc8f8e4683b19eda4)
      2c738c75
    • Andreas Rheinhardt's avatar
      avcodec/hevc_mp4toannexb_bsf: Check NAL size against available input · 82d70d80
      Andreas Rheinhardt authored
      The hevc_mp4toannexb bsf does not explicitly check whether a NAL unit
      is so big that it extends beyond the end of the input packet; it does so
      only implicitly by using the checked version of the bytestream2 API.
      But this has downsides compared to real checks: It can lead to huge
      allocations (up to 2GiB) even when the input packet is just a few bytes.
      And furthermore it leads to uninitialized data being output.
      So add a check to error out early if it happens.
      
      Also check directly whether there is enough data for the length field.
      Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
      (cherry picked from commit ea1b71e82f5a1752d59d3bfb9704092a79eba6b5)
      82d70d80
  2. 14 Jun, 2020 30 commits
  3. 11 Jun, 2020 1 commit
    • Anton Khirnov's avatar
      pthread_frame: change the way delay is set · 569a9d3d
      Anton Khirnov authored
      It is a constant known at codec init, so set it in
      ff_frame_thread_init(). Also, only set it for video, since the meaning
      of this field is not well-defined for audio with frame threading.
      
      Fixes availability of delay in callbacks invoked from the per-thread
      contexts after 1f4cf92c.
      
      (cherry picked from commit 6943ab688d0c75dbab3222b5b80457ab72a0615f)
      569a9d3d
  4. 09 Jun, 2020 1 commit
  5. 08 Jun, 2020 3 commits