1. 07 Jan, 2020 3 commits
    • Marton Balint's avatar
      avformat: convert some avio_flush() calls to avio_write_marker(AVIO_DATA_MARKER_FLUSH_POINT) · 3414115c
      Marton Balint authored
      Converting explicit avio_flush() calls helps us to buffer more data and avoid
      flushing the IO context too often which causes reduced IO throughput for
      non-streamed file output.
      
      The user can control FLUSH_POINT flushing behaviour using the -flush_packets
      option, the default typically means to flush unless a non-streamed file output
      is used, so this change should have no adverse effect on streaming even if it
      is assumed that after an avio_flush() the output buffer is clean so small
      seekbacks within the output buffer will work even when the IO context is not
      seekable.
      Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
      3414115c
    • Marton Balint's avatar
      avformat: remove more unneeded avio_flush() calls · f4a8ea7f
      Marton Balint authored
      These instances are simply redundant or present because avio_flush() used to be
      required before doing a seekback. That is no longer the case, aviobuf code does
      the flush automatically on seek.
      
      This only affects code which is either disabled for streaming IO contexts or
      does no seekbacks after the flush, so this change should have no adverse effect
      on streaming.
      Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
      f4a8ea7f
    • Marton Balint's avatar
      avformat: remove avio_flush() calls from the end of write_header functions · 4bf90e09
      Marton Balint authored
      To make it consistent with other muxers.
      
      The user can still control the generic flushing behaviour after write_header
      (same way as after packets) using the -flush_packets option, the default
      typically means to flush unless a non-streamed file output is used.
      
      Therefore this change should have no adverse effect on streaming, even if it is
      assumed that the first packet has a clean buffer, so small seekbacks within the
      output buffer work even when the IO context is not seekable.
      Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
      4bf90e09
  2. 12 Dec, 2019 1 commit
  3. 25 Oct, 2019 1 commit
  4. 02 Aug, 2017 1 commit
  5. 30 Sep, 2016 1 commit
    • Anton Khirnov's avatar
      lavf: fix usage of AVIOContext.seekable · 83548fe8
      Anton Khirnov authored
      It is supposed to be a flag. The only currently defined value is
      AVIO_SEEKABLE_NORMAL, but other ones may be added in the future.
      However all the current lavf code treats this field as a bool (mainly
      for historical reasons).
      Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
      83548fe8
  6. 20 Jul, 2016 1 commit
  7. 04 May, 2016 1 commit
  8. 05 Mar, 2016 2 commits
  9. 23 Feb, 2016 1 commit
    • Anton Khirnov's avatar
      lavf: replace AVStream.codec with AVStream.codecpar · 9200514a
      Anton Khirnov authored
      Currently, AVStream contains an embedded AVCodecContext instance, which
      is used by demuxers to export stream parameters to the caller and by
      muxers to receive stream parameters from the caller. It is also used
      internally as the codec context that is passed to parsers.
      
      In addition, it is also widely used by the callers as the decoding (when
      demuxer) or encoding (when muxing) context, though this has been
      officially discouraged since Libav 11.
      
      There are multiple important problems with this approach:
          - the fields in AVCodecContext are in general one of
              * stream parameters
              * codec options
              * codec state
            However, it's not clear which ones are which. It is consequently
            unclear which fields are a demuxer allowed to set or a muxer allowed to
            read. This leads to erratic behaviour depending on whether decoding or
            encoding is being performed or not (and whether it uses the AVStream
            embedded codec context).
          - various synchronization issues arising from the fact that the same
            context is used by several different APIs (muxers/demuxers,
            parsers, bitstream filters and encoders/decoders) simultaneously, with
            there being no clear rules for who can modify what and the different
            processes being typically delayed with respect to each other.
          - avformat_find_stream_info() making it necessary to support opening
            and closing a single codec context multiple times, thus
            complicating the semantics of freeing various allocated objects in the
            codec context.
      
      Those problems are resolved by replacing the AVStream embedded codec
      context with a newly added AVCodecParameters instance, which stores only
      the stream parameters exported by the demuxers or read by the muxers.
      9200514a
  10. 21 Feb, 2016 1 commit
  11. 14 Feb, 2016 1 commit
  12. 05 Feb, 2016 5 commits
  13. 12 Jan, 2016 2 commits
  14. 28 Jun, 2015 1 commit
    • Alexandra Hájková's avatar
      lavf: Replace the ASF demuxer · b08569a2
      Alexandra Hájková authored
      The old one is the result of the reverse engineering and guesswork.
      The new one has been written following the now-available specification.
      
      This work is part of Outreach Program for Women Summer 2014 activities
      for the Libav project.
      
      The fate references had to be changed because the old demuxer truncates
      the last frame in some cases, the new one handles it properly.
      The seek-test reference is changed because seeking works differently
      in the new demuxer. When seeking, the packet is not read from the stream
      directly, but it is rather constructed by the demuxer. That is why
      position is -1 now in the reference.
      Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
      b08569a2
  15. 07 Apr, 2015 1 commit
  16. 11 Mar, 2015 1 commit
  17. 09 Mar, 2015 1 commit
  18. 14 Feb, 2015 1 commit
  19. 31 Jan, 2015 1 commit
  20. 20 Dec, 2014 1 commit
  21. 22 Sep, 2014 1 commit
  22. 12 May, 2014 1 commit
  23. 01 May, 2014 1 commit
  24. 30 Apr, 2014 1 commit
    • Daniel Verkamp's avatar
      ff_put_wav_header: add flag to force WAVEFORMATEX · 5e7d21c7
      Daniel Verkamp authored
      Partially undoes commit 2c4e08d8:
      
          riff: always generate a proper WAVEFORMATEX structure in
          ff_put_wav_header
      
      A new flag, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX, is added to force the
      use of WAVEFORMATEX rather than PCMWAVEFORMAT even for PCM codecs.
      
      This flag is used in the Matroska muxer (the cause of the original
      change) and in the ASF muxer, because the specifications for
      these formats indicate explicitly that WAVEFORMATEX should be used.
      
      Muxers for other formats will return to the original behavior of writing
      PCMWAVEFORMAT when writing a header for raw PCM.
      
      In particular, this causes raw PCM in WAV to generate the canonical
      44-byte header expected by some tools.
      Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
      5e7d21c7
  25. 24 Apr, 2014 1 commit
  26. 21 Apr, 2014 1 commit
  27. 17 Apr, 2014 1 commit
  28. 28 Jan, 2014 1 commit
  29. 23 Dec, 2013 1 commit
  30. 19 Sep, 2013 3 commits