The dca parser needs to check that the framesize is actually of a complete
frame, and not of a partial DTS-HD frame, which is not constant size, and
thus the check would fail.
(cherry picked from commit ebc0ccb9af59b78732e82c09f8c90b1d46b478e0)
Review-by: Benjamin Larsson
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Prevent error condition in case sample_rate is unset or set to a negative
value. In particular, fix divide-by-zero error occurring in ffmpeg due to
sample_rate set to 0 in output_packet(), in code:
ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) /
ist->st->codec->sample_rate;
Fix trac ticket #324.
This atom typically is used for a track title.
(cherry picked from commit a356137816b4ea20a892d1fb203b11dbfedbc543)
Reviewed-by: Baptiste Coudurier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
they wont conflict when they get added to the fork with randomly changed order and values.
Also add duplicate codec_ids to allow maintaining compatibility.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
It currently use the simple api and is using the latency information
provided only to offset the stream start.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* qatar/master: (35 commits)
libopencore-amr: check output buffer size before decoding
libopencore-amr: remove unneeded buf_size==0 check.
libopencore-amr: remove unneeded frame_count field.
aac_latm: remove unneeded check for zero-size packet.
pcmdec: fix output buffer size check by calculating the actual output size prior to decoding.
pcmdec: move codec-specific variable declarations to the corresponding codec blocks.
pcmdec: return buf_size instead of src-buf.
avcodec: remove the Zork PCM encoder.
pcm_zork: use AV_SAMPLE_FMT_U8 instead of shifting all samples by 8.
pcmenc: remove unneeded sample_fmt check.
pcmdec: move number of channels check to pcm_decode_init()
pcmdec: remove unnecessary check for sample_fmt change
pcmdec: move DVD PCM bits_per_coded_sample check near to the code that sets the sample size.
pcmdec: do not needlessly set *data_size to 0
alacdec: remove unneeded NULL or zero-size packet checks.
alacdec: simplify buffer allocation by using FF_ALLOC_OR_GOTO()
alacdec: ask for a sample for unsupported sample depths.
alacdec: cosmetics: use 'ch' instead of 'chan' to iterate channels
alacdec: move some declarations to the top of the function
alacdec: always use get_sbits_long() for uncompressed samples
...
Conflicts:
libavcodec/pcm.c
tests/ref/acodec/pcm
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The Zork PCM decoder does not decode the 1 sample we have correctly, therefore
the encoder based on the decoder is also incorrect. There is no good reason to
keep the encoder.