AVFormatParameters are converted into corresponding private options in
av_open_input_file/stream() compat wrappers, so accessing them from
demuxers is redundant.
Since SDL has no audio buffer fullness info, one can get a much precise audio
clock based on the last time of the audio callback and the elapsed time since.
To achieve this I introduced the audio_current_pts and audio_current_pts_drift
variables (similar to video_current_pts and video_current_pts_drift) and
calculate them in the end of the audio callback, when VideoState->audio_clock
is already updated. The reference time I use is from the start of the audio
callback, because this way the amount of time used for audio decoding is not
interfereing with calculation.
I also replaced the audio_write_get_buf_size function with a calculated
variable because when the audio frame decoding is in progress audio_buf_size
and audio_buf_index are not stable, so using them from other threads are not a
good idea.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
aacenc: Fix number of coefficients used in a LFE channel.
aacenc: Fix a segfault with grouped psymodel.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
In apply_unsharp(), when y is >= height, prevent out-of-buffer reading
from src, read from the last buffer line in src2 instead.
The check was implemented in the original unsharp libmpcodecs code and
lost in the port.
This also fixes output discrepancy between the two filters.
Allow to cache more than one frame (e.g. for filters which return
more than one frame when avfilter_request_frame() is called on them),
and do not discard previously cached frames when a new one is added.
In lavfi_read_header(), use the pad index designated in the inout for
linking an output to a sink, rather than always 0. Fix link creation
for filters with more than one output (e.g. the split filter).
FFmpeg writes data_size as AU_UNKNOWN_SIZE, make demuxer not
fail when data_size is set to this value.
Should fix trac issue #394.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* qatar/master:
swscale: add dithering to yuv2yuvX_altivec_real
rv34: free+allocate buffer instead of reallocating it to preserve alignment
h264: add missing brackets.
swscale: use 15-bit intermediates for 9/10-bit scaling.
Merged-by: Michael Niedermayer <michaelni@gmx.at>