]> git.sesse.net Git - ffmpeg/log
ffmpeg
8 years agolavc: Deprecate avctx.rtp_callback field
Vittorio Giovara [Thu, 19 Nov 2015 08:45:01 +0000 (09:45 +0100)]
lavc: Deprecate avctx.rtp_callback field

This function returns the encoded data of a frame, one slice at a time
directly when that slice is encoded, instead of waiting for the full
frame to be done. However this field has a debatable usefulness, since
it looks like it is just a convoluted way to get data at lowest
possible latency, or a somewhat hacky way to store h263 in RFC-2190
rtp encapsulation.

Moreover when multi-threading is enabled (which is by default) the order
of returned slices is not deterministic at all, making the use of this
function not reliable at all (or at the very least, more complicated
than it should be).

So, for the reasons stated above, and being used by only a single encoder
family (mpegvideo), this field is deemed unnecessary, overcomplicated,
and not really belonging to libavcodec. Libavformat features a complete
implementation of RFC-2190, for any other case.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agodoc/encoders: document the QSV option mappings
Anton Khirnov [Sun, 8 Nov 2015 14:24:42 +0000 (15:24 +0100)]
doc/encoders: document the QSV option mappings

8 years agoqsvenc: expose additional encoding options
Anton Khirnov [Sun, 8 Nov 2015 06:58:49 +0000 (07:58 +0100)]
qsvenc: expose additional encoding options

8 years agoqsvenc: support more RC methods
Anton Khirnov [Sun, 8 Nov 2015 05:44:17 +0000 (06:44 +0100)]
qsvenc: support more RC methods

8 years agoqsvenc: factor out common options
Anton Khirnov [Sat, 7 Nov 2015 19:50:41 +0000 (20:50 +0100)]
qsvenc: factor out common options

8 years agoqsvenc: fix setting maxrate for VBR
Anton Khirnov [Fri, 6 Nov 2015 12:29:34 +0000 (13:29 +0100)]
qsvenc: fix setting maxrate for VBR

8 years agoqsvenc: print the actual video parameters used by MSDK
Anton Khirnov [Fri, 6 Nov 2015 12:18:56 +0000 (13:18 +0100)]
qsvenc: print the actual video parameters used by MSDK

8 years agompegvideo_enc: enable rtp_mode when multiple slices are used
Anton Khirnov [Wed, 18 Nov 2015 09:37:16 +0000 (10:37 +0100)]
mpegvideo_enc: enable rtp_mode when multiple slices are used

Currently, multiple slices with just one thread produce corrupted
output.

Additionally, enable slice structured mode for h263(+)

Bug-Id: 912
CC: libav-stabl@libav.org
8 years agompevideo_enc: disallow multiple slices for h261 and flv
Anton Khirnov [Wed, 18 Nov 2015 09:32:34 +0000 (10:32 +0100)]
mpevideo_enc: disallow multiple slices for h261 and flv

They do not work and produce corrupted output.

CC: libav-stable@libav.org
8 years agomovenc: add fallback audio track tref support
John Stebbins [Thu, 5 Nov 2015 17:49:04 +0000 (09:49 -0800)]
movenc: add fallback audio track tref support

This feature allows making associations between audio tracks
that apple players recognize.  E.g. when an ac3 track has a
tref that points to an aac track, devices that don't support
ac3 will automatically fall back to the aac track.

Apple used to *guess* these associations, but new products
(AppleTV 4) no longer guess and this association can only
be made explicitly now using the "fall" tref.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoavcodec: Define side data type for fallback track
John Stebbins [Fri, 6 Nov 2015 15:29:18 +0000 (07:29 -0800)]
avcodec: Define side data type for fallback track

This side data type is meant to be added to AVStream side data.
A fallback track indicates an alternate track to use when the
current track can not be decoded for some reason.  e.g. no
decoder available for codec.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoavformat: expose av_stream_new_side_data helper
John Stebbins [Thu, 5 Nov 2015 17:49:02 +0000 (09:49 -0800)]
avformat: expose av_stream_new_side_data helper

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolavf: document that passing valid timestamps to muxers is now mandatory
Anton Khirnov [Sun, 8 Nov 2015 18:53:54 +0000 (19:53 +0100)]
lavf: document that passing valid timestamps to muxers is now mandatory

Also, extend the documentation about setting timestamps.

8 years agodvdsubdec: Validate the RLE offsets
Luca Barbato [Wed, 11 Nov 2015 19:08:29 +0000 (20:08 +0100)]
dvdsubdec: Validate the RLE offsets

CC: libav-stable@libav.org
8 years agotravis: Enable OSX integration
Vittorio Giovara [Tue, 17 Nov 2015 12:23:08 +0000 (13:23 +0100)]
travis: Enable OSX integration

8 years agoflacenc: Clamp user-supplied min/max prediction orders
Vittorio Giovara [Mon, 16 Nov 2015 15:05:54 +0000 (16:05 +0100)]
flacenc: Clamp user-supplied min/max prediction orders

This mimics what the code does internally for default order values.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agoffv1: Explicitly name the coder type
Vittorio Giovara [Sun, 15 Nov 2015 22:26:07 +0000 (23:26 +0100)]
ffv1: Explicitly name the coder type

FFv1 uses two types of coders, golomb and range with two different
tables. This is exposed this in a rather convoluted way, for example
mentioning to set coder type 1 while initializing the variable 'ac' to 2,
because encoder does not use range coder with default table.

Appropriate internal coder type values have been added and used in any
check rather than using raw numbers.

Initialization of avctx.coder_type in ffv1dec is removed because this
field is encoder only. An unneeded validation check in the encoder
is dropped too.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agohqx: correct type and size check of info_offset
Andreas Cadhalpun [Sun, 15 Nov 2015 09:50:44 +0000 (10:50 +0100)]
hqx: correct type and size check of info_offset

It is used as size argument of ff_canopus_parse_info_tag, which uses it
as size argument to bytestream2_init, which only supports sizes up to
INT_MAX.
Changing it's type to unsigned simplifies the check.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agodds: disable palette flag for compressed images
Andreas Cadhalpun [Fri, 13 Nov 2015 20:48:27 +0000 (21:48 +0100)]
dds: disable palette flag for compressed images

Having both is not valid and can cause a NULL pointer dereference of
frame->data[1] later.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agosegafilm: Fix current_sample after seeking and avio_seek return type
Michael Niedermayer [Fri, 13 Nov 2015 12:32:13 +0000 (13:32 +0100)]
segafilm: Fix current_sample after seeking and avio_seek return type

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agortmpcrypt: Provide the xtea keys in little endian format for consistency
Martin Storsjö [Wed, 11 Nov 2015 20:18:35 +0000 (22:18 +0200)]
rtmpcrypt: Provide the xtea keys in little endian format for consistency

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agortmpcrypt: Do the xtea decryption in little endian mode
Martin Storsjö [Wed, 11 Nov 2015 20:11:19 +0000 (22:11 +0200)]
rtmpcrypt: Do the xtea decryption in little endian mode

The XTEA algorithm operates on 32 bit numbers, not on byte sequences.
The XTEA implementation in libavutil is written assuming big endian
numbers, while the rtmpe signature encryption assumes little endian.

This fixes rtmpe communication with rtmpe servers that use signature
type 8 (XTEA), e.g. crunchyroll.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoxtea: Add functions for little endian mode
Martin Storsjö [Wed, 11 Nov 2015 20:09:41 +0000 (22:09 +0200)]
xtea: Add functions for little endian mode

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoxtea: Clarify that the current API works in big endian mode
Martin Storsjö [Wed, 11 Nov 2015 19:49:44 +0000 (21:49 +0200)]
xtea: Clarify that the current API works in big endian mode

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agodds: add missing newline to log messages
Andreas Cadhalpun [Wed, 11 Nov 2015 00:16:09 +0000 (01:16 +0100)]
dds: add missing newline to log messages

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agodds: validate compressed source buffer size
Andreas Cadhalpun [Wed, 11 Nov 2015 00:15:55 +0000 (01:15 +0100)]
dds: validate compressed source buffer size

A too small buffer will cause segfaults somewhere below
decompress_texture_thread.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agodds: validate source buffer size before copying
Andreas Cadhalpun [Wed, 11 Nov 2015 00:14:57 +0000 (01:14 +0100)]
dds: validate source buffer size before copying

If it is too small av_image_copy_plane segfaults.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agomov: Drop dref when unable to parse
Vittorio Giovara [Mon, 9 Nov 2015 14:14:43 +0000 (15:14 +0100)]
mov: Drop dref when unable to parse

Some entries might be either empty or contain types we do not parse
(eg. 'url '). In both cases, if an 'alis' is not the first entry,
external references are not loaded, so make sure that the array starts
with an 'alis' dref.

8 years agomov: Correctly store dref paths
Vittorio Giovara [Mon, 9 Nov 2015 14:14:42 +0000 (15:14 +0100)]
mov: Correctly store dref paths

Rather than reading the alternate absolute path version from dref
type 18, make sure that 0s are considered as '/'. These values are
sometimes present in the full path, and are mistakenly interpreted as
line terminators othewise.

With the correct handling of this dref type, parsing type 18 is not
needed any more.

8 years agolavc: Add missing mem.h header to libxvid and screenpresso
Vittorio Giovara [Mon, 9 Nov 2015 12:28:13 +0000 (13:28 +0100)]
lavc: Add missing mem.h header to libxvid and screenpresso

8 years agoaiff: Support demuxing G.722 streams
Carl Eugen Hoyos [Fri, 6 Nov 2015 23:35:51 +0000 (00:35 +0100)]
aiff: Support demuxing G.722 streams

8 years agothp: set duration for audio stream too
Paul B Mahol [Thu, 5 Nov 2015 11:04:53 +0000 (12:04 +0100)]
thp: set duration for audio stream too

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agomovenc: Add a unit test for signaling of the track start times
Martin Storsjö [Tue, 10 Nov 2015 21:33:44 +0000 (23:33 +0200)]
movenc: Add a unit test for signaling of the track start times

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomovenc: Allow setting start_dts/start_cts before writing actual packets
Martin Storsjö [Tue, 3 Nov 2015 20:16:21 +0000 (22:16 +0200)]
movenc: Allow setting start_dts/start_cts before writing actual packets

By writing a zero-sized packet, the caller can communicate the
start_dts/start_cts for the stream without actually writing
the first packet.

This allows doing random-access writing of fragments when the
start dts of the stream isn't zero, so that the edit list in the moov
is written based on timestamps from the nominal start time signaled
via the zero-sized packet, while the first proper packet written
corresponds to a later fragment.

To avoid potential unexpected behaviour, empty packets only set
start_dts if the frag_discont flag is set.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomovenc: Add a unit test for frag_discont with edit lists
Martin Storsjö [Sat, 7 Nov 2015 21:55:32 +0000 (23:55 +0200)]
movenc: Add a unit test for frag_discont with edit lists

This tests the case where the muxer correctly guesses that a stream
starts at pts=0.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomovenc: Assume streams starting at pts=0 for discontinuous fragments with editlists
Martin Storsjö [Mon, 5 Jan 2015 13:13:04 +0000 (15:13 +0200)]
movenc: Assume streams starting at pts=0 for discontinuous fragments with editlists

This allows producing fragments discontinously where the video
stream has b-frames (but starts at pts=0), but doesn't work for the
cases with audio with preroll.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomovenc: Add an API unit test for fragmenting options/calls
Martin Storsjö [Thu, 5 Nov 2015 22:12:11 +0000 (00:12 +0200)]
movenc: Add an API unit test for fragmenting options/calls

Contrary to the normal fate tests that run via avconv, this tests
nontrivial call sequences that are only doable via the API
(mainly for different corner cases when using the muxer for
segmenting).

The test muxes fake packet data (with extradata that looks
enough like proper data to make the file be viewable with e.g.
boxdumper) and checks the hash of the produced files. The test also
verifies that fragments produced via different call sequences remain
identical (to avoid e.g. updating the output hashes and suddenly
having fragments that used to be identical suddenly diverging), for
fragments written with frag_discont and/or delay_moov.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomovenc: Automatically flush after writing the initial moov
Martin Storsjö [Fri, 6 Nov 2015 23:18:05 +0000 (01:18 +0200)]
movenc: Automatically flush after writing the initial moov

In most other cases when writing fragmented mp4 files, the output
IO context is flushed after each fragment. Also flush it after
writing the initial moov, to have it behave in the same way.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agovsrc_color: implement frame rate
John Stebbins [Tue, 3 Nov 2015 17:57:28 +0000 (09:57 -0800)]
vsrc_color: implement frame rate

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovf_showinfo: show timebase & framerate too
Michael Niedermayer [Tue, 3 Nov 2015 17:57:27 +0000 (09:57 -0800)]
vf_showinfo: show timebase & framerate too

(cherry picked from ffmpeg commit fdb93996811bacfa7b82995cdc0f93c46f3dc6cc)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovf_frei0r: also set AVFilterLink.frame_rate
Michael Niedermayer [Tue, 3 Nov 2015 17:57:26 +0000 (09:57 -0800)]
vf_frei0r: also set AVFilterLink.frame_rate

(cherry picked from ffmpeg commit 353cf95f948ef7c6139c8ead79e9eeb9eb8d2e6e)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovf_framepack: Check and update frame_rate
Michael Niedermayer [Tue, 3 Nov 2015 17:57:25 +0000 (09:57 -0800)]
vf_framepack: Check and update frame_rate

(cherry picked from ffmpeg commit a46a23d30fea9c8a5570e07ec4d9c9b4eaa6eb4f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovf_interlace: implement frame rate
Michael Niedermayer [Tue, 3 Nov 2015 17:57:24 +0000 (09:57 -0800)]
vf_interlace: implement frame rate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from ffmpeg commit 227b4458fb434875b127a0c2306fa3b899a770bf)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agosetpts: add FRAME_RATE constant
Stefano Sabatini [Tue, 3 Nov 2015 17:57:23 +0000 (09:57 -0800)]
setpts: add FRAME_RATE constant

Useful for dealing with constant frame-rate video.

(cherry picked from ffmpeg commit 722762f7e1212b4d02142778fabfdd73375722e0)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agotestsrc: set output framerate
Stefano Sabatini [Tue, 3 Nov 2015 17:57:22 +0000 (09:57 -0800)]
testsrc: set output framerate

(cherry picked from ffmpeg commit 7cd5fa35fecc2717223459d04822faed6bbd40fa)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoyadif: update frame rate
Michael Niedermayer [Tue, 3 Nov 2015 17:57:21 +0000 (09:57 -0800)]
yadif: update frame rate

(cherry picked from ffmpeg commit 31619584556466e4beab98e9b04ed4c5ba0db178)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovf_fps: set frame_rate.
Nicolas George [Tue, 3 Nov 2015 17:57:20 +0000 (09:57 -0800)]
vf_fps: set frame_rate.

(cherry picked from ffmpeg commit 0d249316043fb69a3972029bff3a2969689ba8b6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agobuffersrc: accept the frame rate as argument.
Nicolas George [Tue, 3 Nov 2015 17:57:19 +0000 (09:57 -0800)]
buffersrc: accept the frame rate as argument.

(cherry picked from ffmpeg commit 9ca440679dc535b31edd569393d8d3dda59db90e)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolavfi: add a frame_rate field to AVFilterLink.
Nicolas George [Tue, 3 Nov 2015 17:57:17 +0000 (09:57 -0800)]
lavfi: add a frame_rate field to AVFilterLink.

(cherry picked from ffmpeg commit 7b42036b3b23c85f473bf9369e37fa8da22eaf93)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoavcodec: fix doxy placement
Anton Khirnov [Fri, 6 Nov 2015 11:27:16 +0000 (12:27 +0100)]
avcodec: fix doxy placement

8 years agolavf: deprecate compute_pkt_fields2
Anton Khirnov [Wed, 7 Oct 2015 13:51:11 +0000 (15:51 +0200)]
lavf: deprecate compute_pkt_fields2

All encoders set pts and dts properly now (and have been doing that for
a while), so there is no good reason to do any timestamp guessing in the
muxer.

The newly added AVStreamInternal will be later used for storing all the
private fields currently living in AVStream.

8 years agolavf: factor out freeing an AVStream
Anton Khirnov [Sun, 20 Jul 2014 08:40:35 +0000 (08:40 +0000)]
lavf: factor out freeing an AVStream

It will be needed in other functions.

8 years agoavconv: set packet duration for CFR video streams
Anton Khirnov [Sun, 11 Oct 2015 10:07:08 +0000 (12:07 +0200)]
avconv: set packet duration for CFR video streams

8 years agolavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
Anton Khirnov [Wed, 7 Oct 2015 09:48:28 +0000 (11:48 +0200)]
lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing

The reasoning for setting it to zero only applies to demuxing.

8 years agolibopenh264enc: Set AVOption data type
Michael Niedermayer [Thu, 5 Nov 2015 11:04:31 +0000 (12:04 +0100)]
libopenh264enc: Set AVOption data type

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agovdpau: Remove a spurious CONFIG_H263_VDPAU_HWACCEL
Michael Niedermayer [Thu, 5 Nov 2015 11:04:43 +0000 (12:04 +0100)]
vdpau: Remove a spurious CONFIG_H263_VDPAU_HWACCEL

Fixes libavcodec/vdpau.c:282:5: warning:
    "CONFIG_H263_VDPAU_HWACCEL" is not defined [-Wundef]

Removed in d35d0c723e3c8fc8cde76bf677f67928f5e179a8.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agosegafilm: drop the "song and dance" for cinepak
Michael Niedermayer [Tue, 7 Jan 2014 13:38:49 +0000 (14:38 +0100)]
segafilm: drop the "song and dance" for cinepak

This seems not to do anything any more since a long time, and removing
it avoids using uninitialized memory. Also change the error value
forwarding as done everywhere else.

Partly fixes: msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agosegafilm: set video and audio stream duration
Paul B Mahol [Thu, 5 Nov 2015 11:04:52 +0000 (12:04 +0100)]
segafilm: set video and audio stream duration

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agosegafilm: implement seeking
Paul B Mahol [Thu, 5 Nov 2015 11:04:51 +0000 (12:04 +0100)]
segafilm: implement seeking

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agovf_pad: fix x, y option expression evaluation
John Stebbins [Sun, 25 Oct 2015 18:36:10 +0000 (11:36 -0700)]
vf_pad: fix x, y option expression evaluation

Calculation of x an y based on width and height did not work when
width == 0 or height == 0.  "0" substitutes the input width and
height, but did so too late for x, y expression evaluation.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoavresample: Document avresample_open() a little better
Luca Barbato [Wed, 4 Nov 2015 08:16:46 +0000 (09:16 +0100)]
avresample: Document avresample_open() a little better

Bug-Id: 911

8 years agomov: detect cover art pictures by content
wm4 [Sat, 31 Oct 2015 13:36:38 +0000 (14:36 +0100)]
mov: detect cover art pictures by content

I've got some m4a samples that had jpeg cover art marked as png. Since
these files were supposedly written by iTunes, and other software can
read it (e.g. clementine does), this should be worked around.

Since png has a very simple to detect header, while it's apparently a
real pain to detect jpeg in the general case, try to detect png and
assume jpeg otherwise. Not bothering with bmp, as I have no test case.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoflashsv: Initialize the block array
Luca Barbato [Sun, 1 Nov 2015 03:07:48 +0000 (04:07 +0100)]
flashsv: Initialize the block array

Otherwise flashsv2_prime could be fed random data.

Bug-Id: 908
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agotruemotion2: Fix the buffer check
Luca Barbato [Sun, 1 Nov 2015 03:07:47 +0000 (04:07 +0100)]
truemotion2: Fix the buffer check

The variable skip contains the expected size in bytes.

Bug-Id: 906
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agomimic: Always return on failure
Luca Barbato [Sun, 1 Nov 2015 03:07:46 +0000 (04:07 +0100)]
mimic: Always return on failure

Bug-Id: 905
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agomsnwc_tcp: Use the correct return values
Luca Barbato [Sun, 1 Nov 2015 03:07:45 +0000 (04:07 +0100)]
msnwc_tcp: Use the correct return values

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agocosmetics: msnwc_tcp: Reformat
Luca Barbato [Sun, 1 Nov 2015 03:07:44 +0000 (04:07 +0100)]
cosmetics: msnwc_tcp: Reformat

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agomsnwc_tcp: Correctly report failure
Luca Barbato [Sun, 1 Nov 2015 03:07:43 +0000 (04:07 +0100)]
msnwc_tcp: Correctly report failure

And prevent a memory leak

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agorpza: Check the blocks left before processing one
Luca Barbato [Sun, 1 Nov 2015 03:07:42 +0000 (04:07 +0100)]
rpza: Check the blocks left before processing one

Bug-Id: 903
CC: libav-stable@libav.org
Reported-By: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agolagarith: Correctly compute hash_shift
Luca Barbato [Sun, 1 Nov 2015 13:46:17 +0000 (14:46 +0100)]
lagarith: Correctly compute hash_shift

All the values are unsigned.

Bug-Id: 907
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agonut: Use the correct codec_tag when multiple are available
Luca Barbato [Thu, 3 Sep 2015 15:31:14 +0000 (17:31 +0200)]
nut: Use the correct codec_tag when multiple are available

Some codecs use the codec_tag to signal specific information and
picking the first one would lead to a broken file.

Bug-Id: 883
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoh264_parser: Rename close() to h264_close()
Diego Biurrun [Sat, 31 Oct 2015 16:21:25 +0000 (17:21 +0100)]
h264_parser: Rename close() to h264_close()

At least on AIX it conflicts with the close() libc function from unistd.h.

8 years agow32pthreads: Map MemoryBarrier to __sync_synchronize on mingw
Martin Storsjö [Wed, 28 Oct 2015 20:20:43 +0000 (22:20 +0200)]
w32pthreads: Map MemoryBarrier to __sync_synchronize on mingw

This fixes building on older mingw (both mingw.org and mingw64;
mingw64 from before May 2011).

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoconfigure: Add a SONAME entry for the android target
Luca Barbato [Thu, 29 Oct 2015 13:01:07 +0000 (14:01 +0100)]
configure: Add a SONAME entry for the android target

In order to load libraries in Android they need to be unversioned.
The android target section was derived from the BSD ones, and they
that simply drop the SONAME

Android M requires to have a SONAME entry but unversioned.

8 years agovdpau: remove dysfunctional H.263 support
Rémi Denis-Courmont [Wed, 28 Oct 2015 19:21:51 +0000 (21:21 +0200)]
vdpau: remove dysfunctional H.263 support

The VDPAU API never explicitly supported H.263 in the first place.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agoomadec: Fix position of opening parenthesis
Vittorio Giovara [Thu, 29 Oct 2015 13:06:06 +0000 (14:06 +0100)]
omadec: Fix position of opening parenthesis

8 years agoh264: Print the complete user message
Vittorio Giovara [Thu, 22 Oct 2015 12:13:29 +0000 (14:13 +0200)]
h264: Print the complete user message

Previously the message was cut off at 256th byte.
This will allow dumping the complete x264 encode info when needed.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agoh264: Print user data SEI under normal debug verbosity
Vittorio Giovara [Thu, 22 Oct 2015 12:13:28 +0000 (14:13 +0200)]
h264: Print user data SEI under normal debug verbosity

Drop the need of setting -debug bugs since it's not a bug, and the
message is already under a AV_LOG_DEBUG log level. Instead only print
it when there is an actual string in it.

8 years agopng: read and write stereo3d frame side data information
Kirill Gavrilov [Tue, 27 Oct 2015 17:27:03 +0000 (18:27 +0100)]
png: read and write stereo3d frame side data information

Use optional sTER chunk defining side-by-side stereo pair
within "Extensions to the PNG 1.2 Specification", version 1.3.0.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agoos_support: Don't try to return the service name as a string in getnameinfo
Martin Storsjö [Wed, 28 Oct 2015 20:19:12 +0000 (22:19 +0200)]
os_support: Don't try to return the service name as a string in getnameinfo

Some systems may be lacking getservbyport; the previous ifdef wasn't
quite enough since it still assumed that struct servent was defined,
as pointed out by Clément Gregoire.

Simply remove the possibility to return non-numeric services in
getnameinfo; no caller of getnameinfo within libavformat
currently try to use getnameinfo for retrieving the port number without
NI_NUMERICSERV, and falling back on getservbyport may be non-threadsafe.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoconfigure: Add -D_CRT_NONSTDC_NO_WARNINGS when building with msvc
Martin Storsjö [Wed, 28 Oct 2015 19:41:46 +0000 (21:41 +0200)]
configure: Add -D_CRT_NONSTDC_NO_WARNINGS when building with msvc

This silences warnings like this one:
libavformat/file.c(62) : warning C4996: 'read': The POSIX name for this
item is deprecated. Instead, use the ISO C++ conformant name: _read.
See online help for details.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopenh264enc: Count and warn about the number of skipped frames
Martin Storsjö [Wed, 28 Oct 2015 09:12:42 +0000 (11:12 +0200)]
libopenh264enc: Count and warn about the number of skipped frames

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopenh264enc: Add an option for controlling the frame skipping
Martin Storsjö [Wed, 28 Oct 2015 09:06:36 +0000 (11:06 +0200)]
libopenh264enc: Add an option for controlling the frame skipping

This allows enabling the frame skipping, which is required for the
encoder to properly hit the target bitrate.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoopus: Do not call vector_fmul_scalar on zero samples
Kieran Kunhya [Wed, 28 Oct 2015 16:01:56 +0000 (17:01 +0100)]
opus: Do not call vector_fmul_scalar on zero samples

The x86 variant of this function crashes in that specific case.

CC: libav-devel@libav.org
8 years agoopus: Buffer the samples from the correct offset
Michael Niedermayer [Tue, 27 Oct 2015 12:47:12 +0000 (13:47 +0100)]
opus: Buffer the samples from the correct offset

When not all the opus stream have the same amount of decoded samples
process the least amount and store what is left from the other streams.

Bug-Id: 909
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoavpicture: Deprecate the single fields
Luca Barbato [Tue, 27 Oct 2015 20:53:26 +0000 (21:53 +0100)]
avpicture: Deprecate the single fields

Silence pointless warnings from gcc.

8 years agoavconv: support infinite loop for the loop option
Alexandra Hájková [Wed, 21 Oct 2015 10:03:58 +0000 (12:03 +0200)]
avconv: support infinite loop for the loop option

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoavpacket: Provide an alloc and a free function for the struct
Luca Barbato [Fri, 23 Oct 2015 09:11:34 +0000 (11:11 +0200)]
avpacket: Provide an alloc and a free function for the struct

Pave the way for having the size of the AVPacket struct not part
of the ABI.

8 years agoavpacket: Deprecate av_dup_packet
Luca Barbato [Fri, 23 Oct 2015 09:11:33 +0000 (11:11 +0200)]
avpacket: Deprecate av_dup_packet

As documented, `av_dup_packet` is broken by design, `av_packet_ref`
matches the AVFrame ref-counted API and can be safely used instead.

8 years agoavformat: Rework add_to_pktbuf
Luca Barbato [Fri, 23 Oct 2015 09:11:32 +0000 (11:11 +0200)]
avformat: Rework add_to_pktbuf

Make it return an error and check its return value when it is used.
Simplify the usage by calling `av_packet_ref` internally when needed.

8 years agoavpacket: Replace av_free_packet with av_packet_unref
Luca Barbato [Fri, 23 Oct 2015 09:11:31 +0000 (11:11 +0200)]
avpacket: Replace av_free_packet with av_packet_unref

`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.

Deprecate `av_free_packet`.

8 years agoavformat: Always return ref-counted AVPacket
Luca Barbato [Fri, 23 Oct 2015 09:11:30 +0000 (11:11 +0200)]
avformat: Always return ref-counted AVPacket

And drop the av_dup_packet from the input_thread.

8 years agoavprobe: Unref the packet once it is used
Luca Barbato [Fri, 23 Oct 2015 09:11:29 +0000 (11:11 +0200)]
avprobe: Unref the packet once it is used

Make sure it does not leak packets.

CC: libav-stable@libav.org
8 years agoroqvideodec: use av_frame_copy
Hendrik Leppkes [Fri, 23 Oct 2015 13:24:11 +0000 (15:24 +0200)]
roqvideodec: use av_frame_copy

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agohap: Set avctx.bits_per_coded_sample
Tom Butterworth [Fri, 23 Oct 2015 12:40:16 +0000 (14:40 +0200)]
hap: Set avctx.bits_per_coded_sample

Fixes an issue where alpha is ignored in some players.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agocmdutils: Check for and report the correct codec capability
Vittorio Giovara [Mon, 19 Oct 2015 11:57:22 +0000 (13:57 +0200)]
cmdutils: Check for and report the correct codec capability

8 years agoscreenpresso: Drop parameter change check
Vittorio Giovara [Mon, 19 Oct 2015 12:34:09 +0000 (14:34 +0200)]
screenpresso: Drop parameter change check

Size can never change, allowing us to use ff_reget_buffer, and to
simplify the code a little.

8 years agompegvideo_enc: Fix encoding videos with less frames than the delay of the encoder
Alexis Ballier [Fri, 23 Oct 2015 13:23:43 +0000 (15:23 +0200)]
mpegvideo_enc: Fix encoding videos with less frames than the delay of the encoder

When the encoder is fed with less frames than its delay, the picture list
looks like { NULL, NULL, ..., frame, frame, frame }. When flushing the
encoder (input frame == NULL), we need to ensure the picture list is
shifted enough so that we do not return an empty packet, which would
mean the encoder has finished, while it has not encoded any frame.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agompegvideo_enc: Merge ifs with identical conditions
Michael Niedermayer [Fri, 23 Oct 2015 13:23:42 +0000 (15:23 +0200)]
mpegvideo_enc: Merge ifs with identical conditions

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agompegvideo_enc: Factor new_picture unref out
Michael Niedermayer [Fri, 23 Oct 2015 13:23:41 +0000 (15:23 +0200)]
mpegvideo_enc: Factor new_picture unref out

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>