ffmpeg.git
4 years agoopencl: Print compilation log
Timothy Gu [Mon, 12 Oct 2015 09:41:15 +0000 (02:41 -0700)]
opencl: Print compilation log

Useful when debugging.

4 years agoopencl: Print error string when compilation fails
Timothy Gu [Mon, 12 Oct 2015 09:38:49 +0000 (02:38 -0700)]
opencl: Print error string when compilation fails

4 years agoaacenc: increase fuzz on aac-ms-encode test
Rostislav Pehlivanov [Sat, 17 Oct 2015 05:55:19 +0000 (06:55 +0100)]
aacenc: increase fuzz on aac-ms-encode test

GCC 3.4 miscompiles it on sunos. Date of release? The second of
August two thousand and five, anno Domini. That's ten years two
months and fourteen days ago. Three thousand seven hundred and
twenty seven days ago. One sixth of the average life expectancy
of a person living in a country with a human development index
of zero point eight hundred and eight, equality adjusted.
GCC 4.3 also miscompiles it, though not as bad.

4 years agofate: adjust aac encoder test values and introduce MS and LTP tests
Rostislav Pehlivanov [Sat, 17 Oct 2015 04:59:19 +0000 (05:59 +0100)]
fate: adjust aac encoder test values and introduce MS and LTP tests

The LTP encoding and the test is a bit slow currently, taking twice
the amount of time the other tests do, so in the future the
total time to encode might be cut down on that test.

4 years agoaacenc: partially revert previous commits to set options via a profile
Rostislav Pehlivanov [Sat, 17 Oct 2015 02:15:44 +0000 (03:15 +0100)]
aacenc: partially revert previous commits to set options via a profile

It didn't work out because of the exceptions that needed to be made
for the "-1" cases and was overall more confusing that just manually
checking and setting options for each profile.

4 years agoavfilter/avfiltergraph: fix -Wunused-result warnings
Ganesh Ajjanagadde [Thu, 15 Oct 2015 02:26:38 +0000 (22:26 -0400)]
avfilter/avfiltergraph: fix -Wunused-result warnings

Commit bf0d2d6030c239f91e0368a20fb2dc0705bfec99 introduced
av_warn_unused_result to avfilter/formats, whose associated warnings
were mostly fixed in 6aaac24d72a7da631173209841a3944fcb4a3309. This
fixes the issues in avfilter/avfiltergraph.

Tested with FATE.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoaacenc: add support for encoding files using Long Term Prediction
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:22:51 +0000 (02:22 +0100)]
aacenc: add support for encoding files using Long Term Prediction

Long Term Prediction allows for prediction of spectral coefficients
via the previously decoded time-dependent samples. This feature
works well with harmonic content 2 or more frames long, like speech,
human or non-human, piano music or any constant tones at very low
bitrates.

It should be noted that the current coder is highly efficient and
the rate control system is unable to encode files at extremely
low bitrates (less than 14kbps seems to be impossible) so this
extension isn't capable of optimum operation. Dramatic difference
is observable with some types of audio and speech but for the most
part the audiable differences are subtle. The spectrum looks better
however so the encoder is able to harvest the additional bits that
this feature provies, should the user choose to enable it. So
it's best to enable this feature only if encoding at the absolutely
lowest bitrate that the encoder is capable of.

4 years agoaacenc: (re)enable Mid/Side coding by default
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:20:13 +0000 (02:20 +0100)]
aacenc: (re)enable Mid/Side coding by default

Apparently it was set to be enabled by default but after the
profile commits it was reverted to be off by default because
I didn't notice.
Works well so (re)enable it.

4 years agoaacenc_pred: only print predictor information if profile is aac_main
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:15:44 +0000 (02:15 +0100)]
aacenc_pred: only print predictor information if profile is aac_main

Needed because LTP uses predictor_present as well.

4 years agoaacenc: correctly zero prediction_used array
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:14:10 +0000 (02:14 +0100)]
aacenc: correctly zero prediction_used array

An oversight, probably because of copy-pasting the TNS line.

4 years agoaacenc: slightly simplify and remove a redundant variable
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:13:00 +0000 (02:13 +0100)]
aacenc: slightly simplify and remove a redundant variable

Functionally identical, doesn't change anything.

4 years agoaacenc_pred: correct header information
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:10:56 +0000 (02:10 +0100)]
aacenc_pred: correct header information

4 years agoaacenc: indicate that TNS is off by default
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:08:34 +0000 (02:08 +0100)]
aacenc: indicate that TNS is off by default

Doesn't change anything, just a slight clarification that
under all profiles TNS is currently off. That'll be soon to change
hopefully.

4 years agoaactab: move ltp_coef[] from aacdectab to aactab
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:06:09 +0000 (02:06 +0100)]
aactab: move ltp_coef[] from aacdectab to aactab

The encoder makes use of it in the following commits.

4 years agoavcodec/ffv1: Initialize vlc_state on allocation
Michael Niedermayer [Sat, 17 Oct 2015 00:13:42 +0000 (02:13 +0200)]
avcodec/ffv1: Initialize vlc_state on allocation

This ensures that they are always set to valid values
Fixes Ticket4939

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavutil/mem: add av_warn_unused_result
Ganesh Ajjanagadde [Thu, 15 Oct 2015 21:38:03 +0000 (17:38 -0400)]
avutil/mem: add av_warn_unused_result

This adds av_warn_unused_result to functions whose return codes need to
be checked.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavutil: undo FF_API_CRYPTO_CONTEXT deprecation
James Almer [Fri, 16 Oct 2015 06:04:20 +0000 (03:04 -0300)]
avutil: undo FF_API_CRYPTO_CONTEXT deprecation

It's been argued that the benefits of the current implementation far outweight
those of making the structs opaque.

This deprecation is not present in any release, so it can be safely removed.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavdevice/internal: add av_warn_unused_result
Ganesh Ajjanagadde [Fri, 16 Oct 2015 01:49:30 +0000 (21:49 -0400)]
avdevice/internal: add av_warn_unused_result

This does not trigger any warnings but adds robustness.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavutil/file: add av_warn_unused_result to av_file_map
Ganesh Ajjanagadde [Thu, 15 Oct 2015 22:18:02 +0000 (18:18 -0400)]
avutil/file: add av_warn_unused_result to av_file_map

The return code here should be checked.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavutil/internal: add av_warn_unused_result to avpriv_open
Ganesh Ajjanagadde [Thu, 15 Oct 2015 21:49:48 +0000 (17:49 -0400)]
avutil/internal: add av_warn_unused_result to avpriv_open

The open syscall can obviously fail, and its return code needs to be
checked.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoswscale/swscale: add av_warn_unused_result to sws_init_context
Ganesh Ajjanagadde [Fri, 16 Oct 2015 01:44:22 +0000 (21:44 -0400)]
swscale/swscale: add av_warn_unused_result to sws_init_context

This should not trigger any warnings; but adds robustness.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoMerge commit '68e00ad66d13c57d9eb3a3862b44ab3fb030e19f'
Hendrik Leppkes [Fri, 16 Oct 2015 21:04:59 +0000 (23:04 +0200)]
Merge commit '68e00ad66d13c57d9eb3a3862b44ab3fb030e19f'

* commit '68e00ad66d13c57d9eb3a3862b44ab3fb030e19f':
  w32pthreads: fix mingw build on x86 with -msse2 or higher

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'b52307933b576eba741c80108c3dad09eb48ba12'
Hendrik Leppkes [Fri, 16 Oct 2015 21:04:46 +0000 (23:04 +0200)]
Merge commit 'b52307933b576eba741c80108c3dad09eb48ba12'

* commit 'b52307933b576eba741c80108c3dad09eb48ba12':
  wrapped_avframe: Drop a now-unused variable

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '49d7fcd774ac31f242818ad9d45d9c013f3bb3db'
Hendrik Leppkes [Fri, 16 Oct 2015 21:04:14 +0000 (23:04 +0200)]
Merge commit '49d7fcd774ac31f242818ad9d45d9c013f3bb3db'

* commit '49d7fcd774ac31f242818ad9d45d9c013f3bb3db':
  mpeg12: Unbreak building stale code

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '504e3f75bf73a488d39a80a42962bae2a353dd6b'
Hendrik Leppkes [Fri, 16 Oct 2015 21:03:49 +0000 (23:03 +0200)]
Merge commit '504e3f75bf73a488d39a80a42962bae2a353dd6b'

* commit '504e3f75bf73a488d39a80a42962bae2a353dd6b':
  aac: Make codec init run under ff_thread_once

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '1f84b008bf2b1eaca473937c48788cb4e4ce1aea'
Hendrik Leppkes [Fri, 16 Oct 2015 21:00:11 +0000 (23:00 +0200)]
Merge commit '1f84b008bf2b1eaca473937c48788cb4e4ce1aea'

* commit '1f84b008bf2b1eaca473937c48788cb4e4ce1aea':
  fate: Move screenpresso to the appropriate screen capture file

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '2d59159508c5c1830cc5da907a9454e229077320'
Hendrik Leppkes [Fri, 16 Oct 2015 20:58:24 +0000 (22:58 +0200)]
Merge commit '2d59159508c5c1830cc5da907a9454e229077320'

* commit '2d59159508c5c1830cc5da907a9454e229077320':
  lavc: AV-prefix a few left out capabilities

Not applied, since this change breaks compilation and is not correct.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '9ef748173a4e0e58d40afaf38397783cd2537eaa'
Hendrik Leppkes [Fri, 16 Oct 2015 20:57:21 +0000 (22:57 +0200)]
Merge commit '9ef748173a4e0e58d40afaf38397783cd2537eaa'

* commit '9ef748173a4e0e58d40afaf38397783cd2537eaa':
  cmdutils: Print general codec capabilities

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'e240a28b20680b326a39b0860fda37d7e459bfc0'
Hendrik Leppkes [Fri, 16 Oct 2015 20:46:23 +0000 (22:46 +0200)]
Merge commit 'e240a28b20680b326a39b0860fda37d7e459bfc0'

* commit 'e240a28b20680b326a39b0860fda37d7e459bfc0':
  cmdutils: Add auto to threading capabilities report

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoavcodec/ffv1dec: update progress in case of broken pointer chains
Michael Niedermayer [Fri, 16 Oct 2015 20:25:20 +0000 (22:25 +0200)]
avcodec/ffv1dec: update progress in case of broken pointer chains

Fixes deadlock
Fixes Ticket4932

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/ffv1dec: Clear slice coordinates if they are invalid or slice header decoding...
Michael Niedermayer [Fri, 16 Oct 2015 18:15:48 +0000 (20:15 +0200)]
avcodec/ffv1dec: Clear slice coordinates if they are invalid or slice header decoding fails for other reasons

Fixes Ticket4931

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/rsd: propagate return values of extradata helper functions
James Almer [Fri, 16 Oct 2015 19:09:10 +0000 (16:09 -0300)]
avformat/rsd: propagate return values of extradata helper functions

They can return errors other than ENOMEM

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/nvenc: fix b frame n_quant_offset
Agatha Hu [Fri, 16 Oct 2015 16:23:51 +0000 (18:23 +0200)]
avcodec/nvenc: fix b frame n_quant_offset

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
4 years agow32pthreads: fix mingw build on x86 with -msse2 or higher
Hendrik Leppkes [Wed, 14 Oct 2015 21:18:17 +0000 (23:18 +0200)]
w32pthreads: fix mingw build on x86 with -msse2 or higher

When SSE2 or higher compiler optimizations are used, mingw uses
the _mm_mfence intrinsic for MemoryBarrier, however it doesn't include
the appropriate headers automatically.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agowrapped_avframe: Drop a now-unused variable
Luca Barbato [Fri, 16 Oct 2015 12:45:45 +0000 (14:45 +0200)]
wrapped_avframe: Drop a now-unused variable

4 years agompeg12: Unbreak building stale code
Luca Barbato [Fri, 16 Oct 2015 06:45:04 +0000 (08:45 +0200)]
mpeg12: Unbreak building stale code

Broken in 2d59159508c5c1830cc5da907a9454e229077320

4 years agoavformat: add svag demuxer
Paul B Mahol [Fri, 16 Oct 2015 12:01:53 +0000 (14:01 +0200)]
avformat: add svag demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat/rsd: add WADP support
Paul B Mahol [Thu, 15 Oct 2015 22:09:02 +0000 (00:09 +0200)]
avformat/rsd: add WADP support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat: add ads demuxer
Paul B Mahol [Wed, 14 Oct 2015 09:58:38 +0000 (11:58 +0200)]
avformat: add ads demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat: add vag demuxer
Paul B Mahol [Tue, 13 Oct 2015 10:52:54 +0000 (12:52 +0200)]
avformat: add vag demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat: add genh demuxer
Paul B Mahol [Mon, 12 Oct 2015 20:58:05 +0000 (22:58 +0200)]
avformat: add genh demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavcodec: add ADPCM PSX decoder
Paul B Mahol [Tue, 13 Oct 2015 12:16:24 +0000 (14:16 +0200)]
avcodec: add ADPCM PSX decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavfilter/avfilter: Error out if audio parameters change instead of failing an assert
Michael Niedermayer [Thu, 15 Oct 2015 22:24:26 +0000 (00:24 +0200)]
avfilter/avfilter: Error out if audio parameters change instead of failing an assert

Filters which support such changes should be excluded from these checks

Fixes Ticket4884

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agow32pthreads: fix mingw build on x86 with -msse2 or higher
Hendrik Leppkes [Wed, 14 Oct 2015 21:20:09 +0000 (23:20 +0200)]
w32pthreads: fix mingw build on x86 with -msse2 or higher

When SSE2 or higher compiler optimizations are used, mingw uses
the _mm_mfence intrinsic for MemoryBarrier, however it doesn't include
the appropriate headers automatically.

4 years agovp9: use AVFrame.buf[0] to check if a frame is valid
Hendrik Leppkes [Thu, 15 Oct 2015 11:54:10 +0000 (13:54 +0200)]
vp9: use AVFrame.buf[0] to check if a frame is valid

AVFrame.data[0] is not guaranteed to be set with a HWAccel

4 years agofate: use PROGSSUF
Christophe Gisquet [Wed, 14 Oct 2015 17:18:27 +0000 (19:18 +0200)]
fate: use PROGSSUF

May require exporting in the shell var PROGSUF when invoking a
shell script.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavdevice/alsa: add av_warn_unused_result
Ganesh Ajjanagadde [Fri, 16 Oct 2015 01:57:38 +0000 (21:57 -0400)]
avdevice/alsa: add av_warn_unused_result

This does not trigger any warnings, but adds robustness.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavutil/cast5: update Doxygen for av_cast5_init with return information
Ganesh Ajjanagadde [Thu, 15 Oct 2015 21:43:25 +0000 (17:43 -0400)]
avutil/cast5: update Doxygen for av_cast5_init with return information

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoswresample/swresample_internal: add av_warn_unused_result
Ganesh Ajjanagadde [Fri, 16 Oct 2015 01:29:43 +0000 (21:29 -0400)]
swresample/swresample_internal: add av_warn_unused_result

This will trigger a few warnings that need to be fixed.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavutil/crc: use EINVAL instead of -1 for the return code of av_crc_init()
Michael Niedermayer [Fri, 16 Oct 2015 01:24:36 +0000 (03:24 +0200)]
avutil/crc: use EINVAL instead of -1 for the return code of av_crc_init()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/jpeg2000dec: Clear properties in jpeg2000_dec_cleanup() too
Michael Niedermayer [Thu, 15 Oct 2015 19:48:42 +0000 (21:48 +0200)]
avcodec/jpeg2000dec: Clear properties in jpeg2000_dec_cleanup() too

Fixes: Ticket4878

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agomips: disable all features in configure if no cpu is matched
Vicente Olivert Riera [Wed, 14 Oct 2015 13:58:49 +0000 (14:58 +0100)]
mips: disable all features in configure if no cpu is matched

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoRevert "avcodec/h264: remove redundant and bogus get_format call"
wm4 [Thu, 15 Oct 2015 18:19:55 +0000 (20:19 +0200)]
Revert "avcodec/h264: remove redundant and bogus get_format call"

This reverts commit be583c6fd3a6f06844b56619653b9b0e4561870d.

This was not approved, and was accidentally pushed. I'm very sorry.

4 years agoswresample: slightly nicer debug output for auto matrix
wm4 [Thu, 15 Oct 2015 17:07:27 +0000 (19:07 +0200)]
swresample: slightly nicer debug output for auto matrix

This is the matrix that will be used for up/downmixing.

4 years agoavcodec/h264: remove redundant and bogus get_format call
wm4 [Sun, 11 Oct 2015 17:02:40 +0000 (19:02 +0200)]
avcodec/h264: remove redundant and bogus get_format call

The AVCodecContext.get_format callback is not only used for pixel format
negotiation with the API user, but also for hwaccel init. For the
latter, it's required that some codec parameters, in particular the
codec profile, are set when the callback is invoked.

This patch removes a get_format invocation where this is not guaranteed.
The codec parameters, including the profile, are really set further
below. (The same code path that sets the profile also calls get_format
properly too.)

This just happened to work by coincidence in most cases. For example, if
the API user just copied or reused the AVStream's AVCodecContext when
decoding, the profile would be set properly. But in some cases it
fails., such as with the sample WolfensteinTwitch.mp4 on the samples
server.

Remove the redundant get_format call. Apparently it serves no purpose
anymore, although it is possible that this was different at the time it
was added in commit ffd77f94a26be22b8ead3178ceec3ed39e68abc5.

This fixes hwaccel usage for API users which do not set the profile
when setting up the AVCodecContext (which is allowed).

4 years agoaac: Make codec init run under ff_thread_once
Derek Buitenhuis [Wed, 14 Oct 2015 18:24:35 +0000 (14:24 -0400)]
aac: Make codec init run under ff_thread_once

This makes AAC init threadsafe.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoaac: Make codec init run under ff_thread_once
Derek Buitenhuis [Wed, 14 Oct 2015 18:25:51 +0000 (14:25 -0400)]
aac: Make codec init run under ff_thread_once

This makes AAC init threadsafe.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agowinrt: multithreading support
wang-bin [Tue, 29 Sep 2015 10:11:03 +0000 (18:11 +0800)]
winrt: multithreading support

_beginthreadex is for desktop only. CreateThread is available for windows store apps on windows (and phone) 8.1 and later. http://msdn.microsoft.com/en-us/library/ms682453%28VS.85%29.aspx

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
4 years agofate: Move screenpresso to the appropriate screen capture file
Vittorio Giovara [Wed, 14 Oct 2015 13:13:11 +0000 (15:13 +0200)]
fate: Move screenpresso to the appropriate screen capture file

4 years agolavc: AV-prefix a few left out capabilities
Vittorio Giovara [Wed, 14 Oct 2015 13:08:49 +0000 (15:08 +0200)]
lavc: AV-prefix a few left out capabilities

4 years agocmdutils: Print general codec capabilities
Vittorio Giovara [Wed, 14 Oct 2015 13:07:10 +0000 (15:07 +0200)]
cmdutils: Print general codec capabilities

4 years agocmdutils: Add auto to threading capabilities report
Vittorio Giovara [Wed, 14 Oct 2015 13:07:09 +0000 (15:07 +0200)]
cmdutils: Add auto to threading capabilities report

And use 'none' when such capabilities are not set.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agoavformat/hls: add support for EXT-X-MAP
Anssi Hannula [Thu, 15 Oct 2015 11:23:00 +0000 (14:23 +0300)]
avformat/hls: add support for EXT-X-MAP

Without EXT-X-MAP support we miss the first bytes of some streams.

These streams worked by luck before byte-ranged segment support was added in
da7759b3579de3e98deb1ac58e642b861280ba54

Fixes ticket #4797.

4 years agoavformat/hls: fix segment selection regression on track changes of live streams
Anssi Hannula [Thu, 15 Oct 2015 10:42:38 +0000 (13:42 +0300)]
avformat/hls: fix segment selection regression on track changes of live streams

Commit ad701326b43078b90 ("avformat/hls: open playlists immediately when
AVDISCARD_ALL is dropped") inadvertently caused first_packet to never be
cleared, causing select_cur_seq_no() to not use the specific code for
live streams.

In practice this means that when the user selects a different audio
track during live stream (i.e. non-VOD) playback, there may be some
additional delay as the code might select an incorrect segment at first,
and we have to wait for video to catch audio (if too late segment was
selected) or to download more following audio segments (if too early
segment was selected).

Fix that by restoring the zeroing of first_packet.

4 years agovp9: expose reference frames in VP9SharedContext
Hendrik Leppkes [Wed, 14 Oct 2015 08:03:20 +0000 (10:03 +0200)]
vp9: expose reference frames in VP9SharedContext

4 years agovp9: split header into separate struct and expose in vp9.h
Ronald S. Bultje [Wed, 14 Oct 2015 07:51:54 +0000 (09:51 +0200)]
vp9: split header into separate struct and expose in vp9.h

This allows hwaccels to access the bitstream header information.

4 years agobuild/videotoolbox: add missing CoreVideo framework
Clément Bœsch [Thu, 15 Oct 2015 08:43:42 +0000 (10:43 +0200)]
build/videotoolbox: add missing CoreVideo framework

4 years agoffmpeg/videotoolbox: protect UTGetOSTypeFromString on both VDA and VT
Clément Bœsch [Thu, 15 Oct 2015 08:21:52 +0000 (10:21 +0200)]
ffmpeg/videotoolbox: protect UTGetOSTypeFromString on both VDA and VT

4 years agoffmpeg/videotoolbox: try to fix compilation when cross compiling ffmpeg with VT for...
Clément Bœsch [Thu, 15 Oct 2015 08:12:19 +0000 (10:12 +0200)]
ffmpeg/videotoolbox: try to fix compilation when cross compiling ffmpeg with VT for iOS under certain configuration

Likely a regression from 8f6f357fde0ea88db180db07a6d749ef95f52c28

4 years agodoc/ffmpeg: use stream_loop instead of loop
Ganesh Ajjanagadde [Thu, 15 Oct 2015 01:51:15 +0000 (21:51 -0400)]
doc/ffmpeg: use stream_loop instead of loop

Commit dbb03b8e47f905f0f7b10c3eb5ac11f9bfc793ff renamed loop to
stream_loop. This documents the change.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavfilter/af_tremolo: clean up extra newlines
Kyle Swanson [Wed, 14 Oct 2015 14:56:48 +0000 (09:56 -0500)]
avfilter/af_tremolo: clean up extra newlines

Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodnxhd: interleave AC levels and flags
Christophe Gisquet [Wed, 14 Oct 2015 17:20:49 +0000 (19:20 +0200)]
dnxhd: interleave AC levels and flags

This allows more efficient access to the array as the level and flags
are contiguous. Around 4% faster coefficient decoding.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavf: Remove duplicated latm demuxer.
Carl Eugen Hoyos [Wed, 14 Oct 2015 23:11:17 +0000 (01:11 +0200)]
lavf: Remove duplicated latm demuxer.

The demuxer used to demux loas files for which a dedicated demuxer exists.

4 years agodoc/examples/muxing: Fix mixed declaration and code
Michael Niedermayer [Wed, 14 Oct 2015 22:00:45 +0000 (00:00 +0200)]
doc/examples/muxing: Fix mixed declaration and code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoMerge commit 'd15368ee3926152a3a301c13cc638fbf7a062ddf'
Hendrik Leppkes [Wed, 14 Oct 2015 21:06:06 +0000 (23:06 +0200)]
Merge commit 'd15368ee3926152a3a301c13cc638fbf7a062ddf'

* commit 'd15368ee3926152a3a301c13cc638fbf7a062ddf':
  h264: Run VLC init under pthread_once

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'c53e796f8b69799b7ad6d28fbab981d37edf1bc9'
Hendrik Leppkes [Wed, 14 Oct 2015 21:02:35 +0000 (23:02 +0200)]
Merge commit 'c53e796f8b69799b7ad6d28fbab981d37edf1bc9'

* commit 'c53e796f8b69799b7ad6d28fbab981d37edf1bc9':
  thread: Provide no-op variants for pthread_once

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '08377f9c3bf6dbe216512a2e05c9fac837b13fc0'
Hendrik Leppkes [Wed, 14 Oct 2015 21:02:00 +0000 (23:02 +0200)]
Merge commit '08377f9c3bf6dbe216512a2e05c9fac837b13fc0'

* commit '08377f9c3bf6dbe216512a2e05c9fac837b13fc0':
  dxva: Include last the internal header

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'c1348506697377b46f844339c178332e3314149a'
Hendrik Leppkes [Wed, 14 Oct 2015 21:01:20 +0000 (23:01 +0200)]
Merge commit 'c1348506697377b46f844339c178332e3314149a'

* commit 'c1348506697377b46f844339c178332e3314149a':
  httpauth: Add space after commas in HTTP/RTSP auth header

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'e55376a1fd5abebbb0a082aa20739d58c2260a37'
Hendrik Leppkes [Wed, 14 Oct 2015 20:55:55 +0000 (22:55 +0200)]
Merge commit 'e55376a1fd5abebbb0a082aa20739d58c2260a37'

* commit 'e55376a1fd5abebbb0a082aa20739d58c2260a37':
  rtmpproto: Write correct flv packet sizes at the end of packets

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoffmpeg_opt: rename loop option to stream_loop
Michael Niedermayer [Wed, 14 Oct 2015 17:52:17 +0000 (19:52 +0200)]
ffmpeg_opt:  rename loop option to stream_loop

The "loop" option is used in several demuxers (like img2dec) and muxers, using the same name in ffmpeg_opt
breaks them. Feel free to revert this and replace by any other solution or rename both as preferred
This is just as a quick fix to avoid the regression with existing command lines and to have both named
the same (which does not work)

Example:
./ffmpeg -loop 1 -i fate-suite/png1/lena-rgb24.png -t 1 test.avi
will produce 25 frames with the img2dec loop but only 1 frame at 25fps with the ffmpeg loop option

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/async: cache some data for fast seek backward
Zhang Rui [Tue, 13 Oct 2015 10:30:47 +0000 (18:30 +0800)]
avformat/async: cache some data for fast seek backward

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavutil/fifo: add function av_fifo_generic_peek_at()
Zhang Rui [Wed, 14 Oct 2015 06:20:07 +0000 (14:20 +0800)]
avutil/fifo: add function av_fifo_generic_peek_at()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavutil/intmath: use de Bruijn based ff_ctz
Ganesh Ajjanagadde [Wed, 14 Oct 2015 14:26:59 +0000 (10:26 -0400)]
avutil/intmath: use de Bruijn based ff_ctz

It has already been demonstrated that the de Bruijn method has benefits
over the current implementation: commit 971d12b7f9d7be3ca8eb98e6c04ed521f83cbd3c.
That commit implemented it for long long, this extends it to the int version.

Tested with FATE.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
4 years agoRemove test file that accidentally ended up in one commit
Hendrik Leppkes [Wed, 14 Oct 2015 15:06:07 +0000 (17:06 +0200)]
Remove test file that accidentally ended up in one commit

4 years agolavf/vc1dec: Autodetect raw vc-1 streams.
Carl Eugen Hoyos [Wed, 14 Oct 2015 14:40:57 +0000 (16:40 +0200)]
lavf/vc1dec: Autodetect raw vc-1 streams.

Move the demuxer into its own file.

4 years agodoc/filters: fix selectivecolor example
Clément Bœsch [Wed, 14 Oct 2015 14:34:41 +0000 (16:34 +0200)]
doc/filters: fix selectivecolor example

Fixes Ticket #4927

4 years agoavfilter/formats: add av_warn_unused_result to function prototypes
Ganesh Ajjanagadde [Mon, 5 Oct 2015 13:20:33 +0000 (09:20 -0400)]
avfilter/formats: add av_warn_unused_result to function prototypes

This uses the av_warn_unused_result attribute liberally to catch some forms of improper
usage of functions defined in avfilter/formats.h.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavfilter/all: propagate errors of functions from avfilter/formats
Ganesh Ajjanagadde [Mon, 5 Oct 2015 03:39:25 +0000 (23:39 -0400)]
avfilter/all: propagate errors of functions from avfilter/formats

Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM).
This propagates the return values.

All of these were found by using av_warn_unused_result, demonstrating its utility.

Tested with FATE. I am least sure of the changes to avfilter/filtergraph,
since I don't know what/how reduce_format is intended to behave and how it should
react to errors.

Fixes: CID 132568013256791325678.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Previous version Reviewed-by: Nicolas George <george@nsup.org>
Previous version Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoMerge commit '6a23a34274b747280c1e4a00ad22f97f99bbb48a'
Hendrik Leppkes [Wed, 14 Oct 2015 13:01:54 +0000 (15:01 +0200)]
Merge commit '6a23a34274b747280c1e4a00ad22f97f99bbb48a'

* commit '6a23a34274b747280c1e4a00ad22f97f99bbb48a':
  mimic: drop AVPicture usage

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3'
Hendrik Leppkes [Wed, 14 Oct 2015 13:00:53 +0000 (15:00 +0200)]
Merge commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3'

* commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3':
  libschroedinger: Properly use AVFrame API

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '901f9c0a32985f48672fd68594111dc55d88a57a'
Hendrik Leppkes [Wed, 14 Oct 2015 12:56:16 +0000 (14:56 +0200)]
Merge commit '901f9c0a32985f48672fd68594111dc55d88a57a'

* commit '901f9c0a32985f48672fd68594111dc55d88a57a':
  qtrle: Properly use AVFrame API

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '17e41cf3614973258c24aa2452215ef7e3bfa5ed'
Hendrik Leppkes [Wed, 14 Oct 2015 12:54:04 +0000 (14:54 +0200)]
Merge commit '17e41cf3614973258c24aa2452215ef7e3bfa5ed'

* commit '17e41cf3614973258c24aa2452215ef7e3bfa5ed':
  avcodec: Do not lock during init if there is no init function

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoffmpeg: add deprecation guards around remaining AVFMT_RAWPICTURE usage
Hendrik Leppkes [Wed, 14 Oct 2015 12:46:40 +0000 (14:46 +0200)]
ffmpeg: add deprecation guards around remaining AVFMT_RAWPICTURE usage

4 years agoffmpeg: remove trailing whitespace that sneaked into the previous merge
Hendrik Leppkes [Wed, 14 Oct 2015 12:51:49 +0000 (14:51 +0200)]
ffmpeg: remove trailing whitespace that sneaked into the previous merge

4 years agoMerge commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e'
Hendrik Leppkes [Wed, 14 Oct 2015 12:43:20 +0000 (14:43 +0200)]
Merge commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e'

* commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e':
  avformat: Do not use AVFMT_RAWPICTURE

Removal from ffmpeg.c not merged because some parts of avdevice
still use it

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoh264: Run VLC init under pthread_once
Derek Buitenhuis [Wed, 7 Oct 2015 16:33:01 +0000 (12:33 -0400)]
h264: Run VLC init under pthread_once

This makes the h.264 decoder threadsafe to initialize.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agothread: Provide no-op variants for pthread_once
Luca Barbato [Wed, 7 Oct 2015 20:43:38 +0000 (22:43 +0200)]
thread: Provide no-op variants for pthread_once

4 years agodxva: Include last the internal header
Luca Barbato [Tue, 13 Oct 2015 21:20:33 +0000 (23:20 +0200)]
dxva: Include last the internal header

It redefines _WIN32_WINNT, possibly causing problems with the
w32pthreads.h header.

4 years agohttpauth: Add space after commas in HTTP/RTSP auth header
Andrey Utkin [Tue, 13 Oct 2015 09:44:37 +0000 (12:44 +0300)]
httpauth: Add space after commas in HTTP/RTSP auth header

This fixes access to Grandstream cameras, which return 401 otherwise.
VLC sends Authorization: header with spaces between parameters, and it
is known to work with Grandstream devices and broad range of other HTTP
and RTSP servers, so author considers switching to such behaviour safe.

See RFC 2617 (HTTP Auth).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agortmpproto: Write correct flv packet sizes at the end of packets
Michael Niedermayer [Tue, 13 Oct 2015 09:17:24 +0000 (12:17 +0300)]
rtmpproto: Write correct flv packet sizes at the end of packets

In one case it was written as zero, one case left it uninitialized,
missed the 11 bytes for the flv header.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>