This unbreaks muxing-encoding
Example:
ffmpeg -i matrixbench_mpeg2.mpg new.avi
-rw-r----- 1 michael michael 226035354 Jan 1 16:27 new.avi
-rw-r----- 1 michael michael 10016802 Jan 1 16:28 ref.avi
Also av_get_audio_frame_duration() itself uses frame_size
This reverts commit 29e6606e9b, reversing
changes made to 53448461a7.
* commit '9f1eccb97bf8894cb18b14f642500686505ef186':
ff_parse_specific_params: do not use AVCodecContext.frame_size
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
It will not be set unless the muxing codec context is also the encoding
context, which is discouraged. When the frame size is not known from
av_get_audio_frame_duration(), the fallback should still be good enough.
Allow writing an empty channel mask into the wave format header. Useful
if the input file contains an unknown channel layout.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit '56dc46a1893251e74be1ad63e54fb38d754bb1fe':
riffenc: do not fall back on AVCodecContext.frame_size for MP3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
It will not be set unless the codec context is used as the encoding
context, which is discouraged. For MP2, av_get_audio_frame_duration()
will already set the frame size properly. For MP3, set the frame size
explicitly.
* commit '194be1f43ea391eb986732707435176e579265aa':
lavf: switch to AVStream.time_base as the hint for the muxer timebase
Conflicts:
doc/APIchanges
libavformat/filmstripenc.c
libavformat/movenc.c
libavformat/mxfenc.c
libavformat/oggenc.c
libavformat/swf.h
libavformat/version.h
tests/ref/lavf/mkv
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd754ed41727b1fcbab335b510248a9758a73320c':
riffenc: take an AVStream instead of an AVCodecContext
Conflicts:
libavformat/nutenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Previously, AVStream.codec.time_base was used for that purpose, which
was quite confusing for the callers. This change also opens the path for
removing AVStream.codec.
The change in the lavf-mkv test is due to the native timebase (1/1000)
being used instead of the default one (1/90000), so the packets are now
sent to the crc muxer in the same order in which they are demuxed
(previously some of them got reordered because of inexact timestamp
conversion).
Partially undoes commit 2c4e08d893:
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: Michael Niedermayer <michaelni@gmx.at>
* commit '3dd5c95deef51d7fbf6f4458ba42d1335d2f1472':
riff: Move muxing code to a separate file
Conflicts:
configure
libavformat/riff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>