OSDN Git Service

android-x86/external-ffmpeg.git
9 years agotiff: set the correct return value when check_size() fails
Vittorio Giovara [Fri, 12 Dec 2014 18:25:58 +0000 (18:25 +0000)]
tiff: set the correct return value when check_size() fails

Only one instance affected and solved as other occurences.

9 years agotiff: Check the check_size() return value and forward it
Luca Barbato [Wed, 10 Dec 2014 01:44:20 +0000 (02:44 +0100)]
tiff: Check the check_size() return value and forward it

Also use the same type for add_entry and check_size.

Bug-Id: CID 700699
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Vittorio Giovara <vittorio.giovarao@gmail.com>
9 years agoprores: Evaluate all the quantizers
Luca Barbato [Wed, 10 Dec 2014 00:43:50 +0000 (01:43 +0100)]
prores: Evaluate all the quantizers

Prevent an uninitialized data access.

CC: libav-stable@libav.org
Bug-Id: CID 703824 / CID 703825
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agomatroskadec: Fix read-after-free in matroska_read_seek()
Xiaohan Wang [Thu, 6 Nov 2014 20:59:54 +0000 (12:59 -0800)]
matroskadec: Fix read-after-free in matroska_read_seek()

In matroska_read_seek(), |tracks| is assigned at the begining of the
function. However, functions like matroska_parse_cues() could reallocate
the tracks and invalidate |tracks|.

This assigns |tracks| only before using it, so that it will not get
invalidated elsewhere.

Bug-Id: chromium/427266

9 years agompegvideo: move REBASE_PICTURE where it is used
Vittorio Giovara [Tue, 9 Dec 2014 16:47:53 +0000 (16:47 +0000)]
mpegvideo: move REBASE_PICTURE where it is used

Drop an unused #undef from h264 decoder.

9 years agompegvideo: remove unused function declaration
Vittorio Giovara [Tue, 9 Dec 2014 16:47:52 +0000 (16:47 +0000)]
mpegvideo: remove unused function declaration

9 years agohevc: always clip luma_log2_weight_denom
Vittorio Giovara [Wed, 10 Dec 2014 01:41:44 +0000 (01:41 +0000)]
hevc: always clip luma_log2_weight_denom

Its value shall be between 0 and 7 according to the specifications.

CC: libav-stable@libav.org
Bug-Id: CID 1257502

9 years agovaapi: wrap codec specific functions in appropiate #ifs
Thiago Santos [Sun, 14 Dec 2014 20:59:27 +0000 (22:59 +0200)]
vaapi: wrap codec specific functions in appropiate #ifs

Fix linking when only a subset of vaapi decoders is enabled.

Bug-Id: 760
CC: libav-stable@libav.org
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agosvq1dec: Unbreak the scratch buffer allocation
Michael Niedermayer [Sat, 6 Dec 2014 10:40:30 +0000 (11:40 +0100)]
svq1dec: Unbreak the scratch buffer allocation

The input packets are always assumed to be padded and
the av_fast_ family of function takes a pointer to a pointer.

Thanks to Nicolas Dufresne <nicolas.dufresne@collabora.com> for
a similar patch.

Introduced in 7b588bb691644e1b3c168b99accf74248a24e3cf.

Bug-Id: 766
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoasvenc: Forward the error instead of asserting on it
Luca Barbato [Wed, 10 Dec 2014 02:40:25 +0000 (03:40 +0100)]
asvenc: Forward the error instead of asserting on it

Bug-Id: CID 732997
CC: libav-stable@libav.org
9 years agoavconv: Use the mpeg12 private option scan_offset
Julien Ramseier [Sun, 14 Dec 2014 01:00:04 +0000 (02:00 +0100)]
avconv: Use the mpeg12 private option scan_offset

Introduced in aed790070486b1b01b48106310d9d0ca1730e459

Bug-Id: debian/773055
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agovdpau: add mapping for H.264 Constrained Baseline profile and fallback
Rémi Denis-Courmont [Sat, 13 Dec 2014 16:42:21 +0000 (18:42 +0200)]
vdpau: add mapping for H.264 Constrained Baseline profile and fallback

Old VDPAU drivers do not support this newly defined profile, so falling
back to Main profile is necessary for backward binary compatibility.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agovdpau: add mapping for H.264 Extended profile
Rémi Denis-Courmont [Sat, 13 Dec 2014 16:42:20 +0000 (18:42 +0200)]
vdpau: add mapping for H.264 Extended profile

Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agovdpau: revector macro to reduce line span
Rémi Denis-Courmont [Sat, 13 Dec 2014 16:42:19 +0000 (18:42 +0200)]
vdpau: revector macro to reduce line span

Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agothread: use "" instead of <> for including the w32pthreads wrapper
Anton Khirnov [Mon, 1 Dec 2014 13:15:36 +0000 (14:15 +0100)]
thread: use "" instead of <> for including the w32pthreads wrapper

Found-by: Dave Yeo <dave.r.yeo@gmail.com>
9 years agodashenc: Change the duration fields to 64 bit
Martin Storsjö [Wed, 10 Dec 2014 06:08:59 +0000 (08:08 +0200)]
dashenc: Change the duration fields to 64 bit

For the last_duration field, it's mostly theoretical, but the
total_duration field more probably may need to actually be 64 bit.

Bug-Id: CID 1254944
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agolibfdk-aacdec: Fix a boundary check
Martin Storsjö [Wed, 10 Dec 2014 06:02:43 +0000 (08:02 +0200)]
libfdk-aacdec: Fix a boundary check

This avoids potential out of bounds writes, with potential future
versions of the library.

Bug-Id: CID 1254945
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoxcbgrab: Support empty filename string correctly
Luca Barbato [Wed, 26 Nov 2014 05:20:52 +0000 (06:20 +0100)]
xcbgrab: Support empty filename string correctly

Bug-Id: CID 1254664
CC: libav-stable@libav.org
9 years agodashenc: log file output progress in verbose mode
Bryan Huh [Tue, 9 Dec 2014 08:11:23 +0000 (08:11 +0000)]
dashenc: log file output progress in verbose mode

As the manifest/segments are flushed to disk, log to stderr the
progress, when in verbose logging mode

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpproto: Fix the input RTP data format check
Martin Storsjö [Tue, 9 Dec 2014 14:05:14 +0000 (16:05 +0200)]
rtpproto: Fix the input RTP data format check

Only the upper 2 bits of the first byte are known to be
a fixed value.

The lower bits in the first byte of a RTP packet could be set
if the input is from another RTP packetizers than libavformat's,
but for RTCP packets, they would also be set when sending RTCP RR
packets, triggering false warnings about incorrect input format
to the protocol.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agofate: add dolby true hd tests
Janne Grunau [Mon, 8 Dec 2014 15:21:43 +0000 (16:21 +0100)]
fate: add dolby true hd tests

The existing meridian audio test does not test
ff_mlp_rematrix_channel_arm. This sample (first 640k of
https://samples.libav.org/A-codecs/TrueHD/TrueHD.raw) uses
ff_mlp_rematrix_channel_arm. Since this sample has 5.1 channels it also
allows testing the integrated downmixing.

9 years agoarm: mlpdsp: handle pic offset calculation in a macro
Janne Grunau [Mon, 8 Dec 2014 13:10:18 +0000 (14:10 +0100)]
arm: mlpdsp: handle pic offset calculation in a macro

Makes the code easier to read since it hides different offset
calculations for arm and thumb mode.

9 years agoarm: make ff_mlp_filter_channel_arm and ff_mlp_rematrix_channel_arm position independent
Janne Grunau [Mon, 8 Dec 2014 12:25:55 +0000 (13:25 +0100)]
arm: make ff_mlp_filter_channel_arm and ff_mlp_rematrix_channel_arm position independent

No significant difference in used cpu cycles on a cortex-a9.

9 years agolibavformat: Build hevc.o when building the RTP muxer
Martin Storsjö [Tue, 9 Dec 2014 10:13:54 +0000 (12:13 +0200)]
libavformat: Build hevc.o when building the RTP muxer

The RTP muxer enables the actual codepaths within sdp.c,
which depend on hevc.o since e5cfc8fd.

This fixes builds with --disable-everything --enable-muxer=rtp.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoaarch64: Use .data.rel.ro for const data with relocations
Martin Storsjö [Sun, 16 Nov 2014 10:52:21 +0000 (12:52 +0200)]
aarch64: Use .data.rel.ro for const data with relocations

This reverts commit c00365b46d464ce47716315c1801818d811bdb9a
in addition to using a different section.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoarm: Use .data.rel.ro for const data with relocations
Martin Storsjö [Sun, 16 Nov 2014 10:51:54 +0000 (12:51 +0200)]
arm: Use .data.rel.ro for const data with relocations

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agomov: further expand the list of parsed metadata tags
Dave Rice [Fri, 28 Nov 2014 23:44:06 +0000 (23:44 +0000)]
mov: further expand the list of parsed metadata tags

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agomov: expand the list of parsed metadata tags
Vittorio Giovara [Fri, 28 Nov 2014 23:25:20 +0000 (23:25 +0000)]
mov: expand the list of parsed metadata tags

Based on L-Smash code by Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>.

9 years agomov: parse XMP metadata on demand
Vittorio Giovara [Wed, 3 Dec 2014 02:43:24 +0000 (02:43 +0000)]
mov: parse XMP metadata on demand

The Extensible Metadata Platform tag can contain various kind of data
which are not strictly related to the video file, such as history of edits
and saves from the project file. So display XMP metadata only when the
user explicitly requires it.

Based on a patch by Marek Fort <marek.fort@chyronhego.com>.

9 years agomov: parse @PRM and @PRQ metadata tags
Vittorio Giovara [Wed, 3 Dec 2014 02:42:29 +0000 (02:42 +0000)]
mov: parse @PRM and @PRQ metadata tags

These tags describe the product and quicktime library version respectively.
They originate from Adobe Premiere, but also some other programs use them.
Contrary to other tags, they contain 'raw' data which is not to be
interpreted as iso639 or mac strings.

Based on a patch by Peter Ross <pross@xvid.org>.

9 years agomov: cosmetics: reorder the list of tags
Vittorio Giovara [Wed, 3 Dec 2014 02:41:43 +0000 (02:41 +0000)]
mov: cosmetics: reorder the list of tags

Alphabetically order the list by the tag to facilitate the insertion of
new ones.

9 years agoh264: increase MAX_SLICES to 32
Vittorio Giovara [Fri, 5 Dec 2014 03:46:13 +0000 (03:46 +0000)]
h264: increase MAX_SLICES to 32

H264 streams from CounterPath Bria and some Cisco phones need an
increased pool for correct decoding.

Bug-Id: 645
Sample-Id: bria-h264.mka

9 years agovf_frei0r: do not increment string if it reached the end
Vittorio Giovara [Fri, 5 Dec 2014 02:15:09 +0000 (02:15 +0000)]
vf_frei0r: do not increment string if it reached the end

Bug-Id: 778
CC: libav-stable@libav.org
9 years agoAllow reading of growing avi files (currently being written)
Joakim Plate [Fri, 5 Dec 2014 03:06:50 +0000 (03:06 +0000)]
Allow reading of growing avi files (currently being written)

This uses the RIFF header stored size to figure out the expected AVI
file size, instead of the actual file. To work fully it requires handling
failed avio_seek() instead of assuming they always succeed.

Some fate file has been cut off and contains half a frame at the end which
previously was not output during demuxing. This frame is now output to
encoder, thus the fate diff update.

Bug-Id: 261
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agodpx: always write the image offset
Zoltan Kovacs [Fri, 5 Dec 2014 02:42:10 +0000 (02:42 +0000)]
dpx: always write the image offset

According to the DPX file format description found at
http://www.fileformat.info/format/dpx/egff.htm the ImageElement part of
the GenericImageHeader also contains an an offset to the real image data
beside the same member that can be found in the GenericFileHeader.

Libav keeps this member empty (=0) while some applications expects it to
be filled properly. FATE test updated accordingly.

Bug-Id: 742
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agoriff: Support decoding png in avi (ImageJ)
Carl Eugen Hoyos [Thu, 4 Dec 2014 19:13:19 +0000 (19:13 +0000)]
riff: Support decoding png in avi (ImageJ)

9 years agoarm: fft_vfp: Unify the behaviour in ff_fft_calc_vfp between arm/thumb
Martin Storsjö [Sun, 16 Nov 2014 10:46:51 +0000 (12:46 +0200)]
arm: fft_vfp: Unify the behaviour in ff_fft_calc_vfp between arm/thumb

Don't include the function pointer table in the code segment
in arm mode.

This shouldn't have any significant performance effect. It does
end up as a few more instructions than before, for ARM, but
only at the entry to this function, not within the fft functions
themselves.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoarm: fft_vfp: Add a missing "endconst" when building in thumb mode
Martin Storsjö [Sun, 16 Nov 2014 10:38:53 +0000 (12:38 +0200)]
arm: fft_vfp: Add a missing "endconst" when building in thumb mode

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpproto: Write a warning if the input data written isn't RTP packetized
Martin Storsjö [Sat, 6 Dec 2014 23:42:06 +0000 (01:42 +0200)]
rtpproto: Write a warning if the input data written isn't RTP packetized

Tell the user that the RTP muxer needs to be used to packetize
the data - using the RTP protocol on its own isn't enough.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agodoc: Use the correct @subsection tag
Luca Barbato [Sun, 7 Dec 2014 17:38:56 +0000 (18:38 +0100)]
doc: Use the correct @subsection tag

makeinfo would otherwise refuse to build it.

9 years agomp3: Tweak the probe scores
Luca Barbato [Sat, 6 Dec 2014 11:32:25 +0000 (12:32 +0100)]
mp3: Tweak the probe scores

Having more than 10 consecutive frames decoded as mp3 should be
considered a clear signal that the sample is mp3 and not mpegps.

Reported-By: Florian Iragne <florian@iragne.fr>
CC: libav-stable@libav.org
9 years agolatm: Do not give a score for a single instance
Luca Barbato [Fri, 5 Dec 2014 14:31:20 +0000 (15:31 +0100)]
latm: Do not give a score for a single instance

Bug-Id: 773
CC: libav-stable@libav.org
9 years agolavfi: Increase drawtext font size limits
Михаил Муковников [Tue, 2 Dec 2014 14:09:30 +0000 (17:09 +0300)]
lavfi: Increase drawtext font size limits

Raise the maximum font size to a larger value.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agov210enc: Add SIMD optimised 8-bit and 10-bit encoders
Kieran Kunhya [Tue, 2 Dec 2014 17:08:25 +0000 (17:08 +0000)]
v210enc: Add SIMD optimised 8-bit and 10-bit encoders

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agoswscale: Properly scale YUV
Derek Buitenhuis [Tue, 2 Dec 2014 17:08:24 +0000 (17:08 +0000)]
swscale: Properly scale YUV

Only shift limited range luma, and always only shift chroma
for upconversion.

Based off a patch by Michael Niedermayer.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agomov: skip version and flags attributes in mov_read_chan()
Matthieu Bouron [Thu, 4 Dec 2014 19:13:39 +0000 (19:13 +0000)]
mov: skip version and flags attributes in mov_read_chan()

Fixes decting channel layout for files with uncommon audio, such as
FL and FR in two separate streams. Introduced in 3bab7cd.

CC: libav-devel@libav.org
Sample-Id: ticket1474.mov
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agolavc: mention that the parser callback never returns an error
Vittorio Giovara [Thu, 4 Dec 2014 20:46:16 +0000 (20:46 +0000)]
lavc: mention that the parser callback never returns an error

9 years agorm: Use the correct codec_data_size signedness
Luca Barbato [Thu, 4 Dec 2014 11:00:01 +0000 (12:00 +0100)]
rm: Use the correct codec_data_size signedness

The function takes a size and not an offset.

CC: libav-stable@libav.org
Sample-Id: rm_deadlock.rm

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoAPIchanges: mark the release 11 branch point
wm4 [Wed, 3 Dec 2014 14:01:49 +0000 (15:01 +0100)]
APIchanges: mark the release 11 branch point

9 years agomkv: Validate ASS Start and End fields
Luca Barbato [Wed, 29 Oct 2014 19:39:46 +0000 (20:39 +0100)]
mkv: Validate ASS Start and End fields

CC: libav-stable@libav.org
9 years agoconfigure: enable vda hwaccel by default
Vittorio Giovara [Wed, 3 Dec 2014 03:12:40 +0000 (03:12 +0000)]
configure: enable vda hwaccel by default

Following the old thread suggestions.
Vittorio

9 years agompegvideo: exit cleanly when ff_mpv_common_frame_size_change() fails
Michael Niedermayer [Mon, 24 Nov 2014 17:05:04 +0000 (17:05 +0000)]
mpegvideo: exit cleanly when ff_mpv_common_frame_size_change() fails

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agompegvideo: free_context_frame() cannot fail, make it return void
Michael Niedermayer [Mon, 24 Nov 2014 17:05:03 +0000 (17:05 +0000)]
mpegvideo: free_context_frame() cannot fail, make it return void

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agompegvideo: replace assert about interlaced EC with debug av_log()
Michael Niedermayer [Mon, 24 Nov 2014 17:05:02 +0000 (17:05 +0000)]
mpegvideo: replace assert about interlaced EC with debug av_log()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agompeg12dec: Use more specific error codes
Michael Niedermayer [Mon, 24 Nov 2014 17:05:00 +0000 (17:05 +0000)]
mpeg12dec: Use more specific error codes

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agompeg12dec: Print error/warning messages on issues in mpeg1_decode_sequence()
Michael Niedermayer [Mon, 24 Nov 2014 17:04:58 +0000 (17:04 +0000)]
mpeg12dec: Print error/warning messages on issues in mpeg1_decode_sequence()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoexr: Add a gamma flag to exr loader to avoid banding
Gonzalo Garramuno [Tue, 2 Dec 2014 16:48:25 +0000 (16:48 +0000)]
exr: Add a gamma flag to exr loader to avoid banding

This is needed to avoid banding artifacts when gammaing the picture.
Currently, if done with a video filter, the process is done on uints
instead of full float.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agoh264: proper cleanup in ff_h264_alloc_tables() if DPB alloc fails
Michael Niedermayer [Tue, 2 Dec 2014 16:47:56 +0000 (16:47 +0000)]
h264: proper cleanup in ff_h264_alloc_tables() if DPB alloc fails

CC: libav-devel@libav.org
9 years agoh264: Fix memory leak on ff_h264_decode_init() failure
Dale Curtis [Tue, 2 Dec 2014 16:47:55 +0000 (16:47 +0000)]
h264: Fix memory leak on ff_h264_decode_init() failure

CC: libav-devel@libav.org
9 years agoDrop the unofficial extension prefix for MPEG and MPEG-TS formats
Florent Le Coz [Sat, 29 Nov 2014 16:53:47 +0000 (17:53 +0100)]
Drop the unofficial extension prefix for MPEG and MPEG-TS formats

As per the RFCs:
http://tools.ietf.org/html/rfc3555#page-38
http://tools.ietf.org/html/rfc3003

CC: libav-stable@libav.org
9 years agompegtsenc: recognize .mts as MPEG Transport Stream
Jean-Baptiste Mardelle [Sat, 29 Nov 2014 16:53:46 +0000 (17:53 +0100)]
mpegtsenc: recognize .mts as MPEG Transport Stream

9 years agoAdd support for BDAV/m2ts-mode muxing
Fredrik Axelsson [Sat, 29 Nov 2014 16:53:45 +0000 (17:53 +0100)]
Add support for BDAV/m2ts-mode muxing

Signed-off-by: Fredrik Axelsson <fraxbe@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agooptions_table: fix colorspace minimum option value
Jon Morley [Mon, 10 Nov 2014 18:43:42 +0000 (10:43 -0800)]
options_table: fix colorspace minimum option value

The min value for colorspace should be zero and not one since the first
valid index into the frame colorspace array is AVCOL_SPC_RGB which is 0.

9 years agomov: allocate the tag value dynamically
Thilo Borgmann [Sat, 29 Nov 2014 16:51:14 +0000 (17:51 +0100)]
mov: allocate the tag value dynamically

This allows to load metadata entries longer than 1024 bytes.
Displaying them is still limited to 1024 characters, but applications
can load them fully now.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agomov: Add an option for exporting all metadata
Vittorio Giovara [Sat, 29 Nov 2014 16:51:13 +0000 (17:51 +0100)]
mov: Add an option for exporting all metadata

9 years agomov: do not truncate the language-prefixed tag
Vittorio Giovara [Sat, 29 Nov 2014 16:51:12 +0000 (17:51 +0100)]
mov: do not truncate the language-prefixed tag

9 years agortsp: move the CONFIG_ macros to the beginning of the check
Vittorio Giovara [Sat, 29 Nov 2014 16:39:41 +0000 (17:39 +0100)]
rtsp: move the CONFIG_ macros to the beginning of the check

With --disable-optimizations, the DCE of some compilers does not remove
such unused code, causing linking failure.

9 years agoaac: Simplify decode_mid_side_stereo
Luca Barbato [Fri, 21 Nov 2014 12:57:36 +0000 (12:57 +0000)]
aac: Simplify decode_mid_side_stereo

Might spare few cycles if the compiler is naive and
makes the function more readable.

9 years agoMake the RELEASE file match with the most recent tag
Reinhard Tartler [Mon, 1 Dec 2014 03:31:31 +0000 (22:31 -0500)]
Make the RELEASE file match with the most recent tag

9 years agoReplace lena.pnm
Reinhard Tartler [Thu, 27 Nov 2014 17:21:03 +0000 (18:21 +0100)]
Replace lena.pnm

The new reference.pnm is a freely licensed replacement. The photo has
been taken by Reinhard Tartler on August 28 2014, and is licensed under
the expat license as stated at http://www.jclark.com/xml/copying.txt

9 years agoTreat all '*.pnm' files as non-text file
Reinhard Tartler [Fri, 28 Nov 2014 14:52:50 +0000 (09:52 -0500)]
Treat all '*.pnm' files as non-text file

This convinces the pre-receive hook to not consider all *.pnm files as
text files to reduce the patch sizes and avoids triggering whitespace
checks,

Contains a correction by Janne Grunau <janne-libav@jannau.net>

9 years agortmpproto: Fix a typo in a comment
Martin Storsjö [Fri, 28 Nov 2014 17:39:38 +0000 (19:39 +0200)]
rtmpproto: Fix a typo in a comment

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agodashenc: Avoid a VLA-like construct
Martin Storsjö [Fri, 28 Nov 2014 09:51:05 +0000 (11:51 +0200)]
dashenc: Avoid a VLA-like construct

This fixes the build on compilers that interpreted the earlier
code as a variable length array (which we intentionally disallow).

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agodashenc: Add options to make segment names configurable
Bryan Huh [Thu, 27 Nov 2014 09:46:02 +0000 (09:46 +0000)]
dashenc: Add options to make segment names configurable

This allows one to specify templated segment names for init-segments,
media-segments, and for the base-url in the case of single-file.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpproto: Only prepend @setDataFrame for onMetaData and |RtmpSampleAccess
Martin Storsjö [Mon, 24 Nov 2014 08:51:46 +0000 (10:51 +0200)]
rtmpproto: Only prepend @setDataFrame for onMetaData and |RtmpSampleAccess

Currently, when streaming to an RTMP server, any time a packet of type
RTMP_PT_NOTIFY is encountered, the packet is prepended with @setDataFrame
before it gets sent to the server. This is incorrect; only packets for
onMetaData and |RtmpSampleAccess should invoke @setDataFrame on the RTMP
server. Specifically, the current bug manifests itself when trying to
stream onTextData or onCuePoint invocations.

This fix addresses that problem and ensures that the @setDataFrame is
only prepended for onMetaData and |RtmpSampleAccess.

Since data is fed to the rtmp_write function in smaller pieces (depending
on the calling IO buffer size), we can't generally assume that the
whole packet (or even the whole command string) is available at once,
therefore we can only check the command string once the full packet
has been transferred to us for sending.

Based on a patch by Jeffrey Wescott.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmppkt: Make pkt->data reallocable
Martin Storsjö [Mon, 24 Nov 2014 08:41:34 +0000 (10:41 +0200)]
rtmppkt: Make pkt->data reallocable

We try to avoid mixing av_malloc with av_realloc, since av_malloc
may be implemented with functions that can't (formally) be mixed
with the functions used in av_realloc.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpproto: Simplify code for copying data into the output packet
Martin Storsjö [Mon, 24 Nov 2014 08:17:20 +0000 (10:17 +0200)]
rtmpproto: Simplify code for copying data into the output packet

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpproto: Clarify a comment
Martin Storsjö [Mon, 24 Nov 2014 08:02:11 +0000 (10:02 +0200)]
rtmpproto: Clarify a comment

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoopusdec: make sure all substreams have the same number of coded samples
Anton Khirnov [Mon, 24 Nov 2014 10:16:46 +0000 (11:16 +0100)]
opusdec: make sure all substreams have the same number of coded samples

Fixes invalid writes with invalid multichannel streams.

CC:libav-stable@libav.org

9 years agovf_interlace: get rid of useless loads
Kieran Kunhya [Tue, 25 Nov 2014 16:14:32 +0000 (17:14 +0100)]
vf_interlace: get rid of useless loads

Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agolavu: fix memory leaks by using a mutex instead of atomics
wm4 [Fri, 14 Nov 2014 12:34:50 +0000 (13:34 +0100)]
lavu: fix memory leaks by using a mutex instead of atomics

The buffer pool has to atomically add and remove entries from the linked
list of available buffers. This was done by removing the entire list
with a CAS operation, working on it, and then setting it back again
(using a retry-loop in case another thread was doing the same thing).

This could effectively cause memory leaks: while a thread was working on
the buffer list, other threads would allocate new buffers, increasing
the pool's total size. There was no real leak, but since these extra
buffers were not needed, but not free'd either (except when the buffer
pool was destroyed), this had the same effects as a real leak. For some
reason, growth was exponential, and could easily kill the process due
to OOM in real-world uses.

Fix this by using a mutex to protect the list operations. The fancy
way atomics remove the whole list to work on it is not needed anymore,
which also avoids the situation which was causing the leak.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agolavu: add wrappers for the pthreads mutex API
Anton Khirnov [Sun, 23 Nov 2014 20:25:05 +0000 (21:25 +0100)]
lavu: add wrappers for the pthreads mutex API

Also add no-op fallbacks when threading is disabled.

This helps keeping the code clean if Libav is compiled for targets
without threading. Since we assume that no threads of any kind are used
in such configurations, doing nothing is ok by definition.

Based on a patch by wm4 <nfxjfg@googlemail.com>.

9 years agoRevert "lavf: Don't try to update files atomically with renames on windows"
Martin Storsjö [Tue, 25 Nov 2014 08:51:23 +0000 (10:51 +0200)]
Revert "lavf: Don't try to update files atomically with renames on windows"

This reverts commit b9d08c77a44390b0848c06f20bc0e9e951ba6a3c.

After taking MoveFileEx into use, we can replace files with renames
on windows as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agolavf: Use MoveFileEx instead of rename/_wrename on windows
Martin Storsjö [Tue, 25 Nov 2014 09:08:59 +0000 (11:08 +0200)]
lavf: Use MoveFileEx instead of rename/_wrename on windows

This allows getting the normal unix semantics, where a rename
allows replacing an existing file.

Based on a suggestion by Reimar Döffinger.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoShare the utf8 to wchar conversion routine between lavf and lavu
Martin Storsjö [Tue, 25 Nov 2014 08:39:50 +0000 (10:39 +0200)]
Share the utf8 to wchar conversion routine between lavf and lavu

This doesn't add any dependency on library internals, since this
only is a static inline function that gets built into each of the
calling functions - this is only to reduce the code duplication.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agomovenc: Expose the fragment index as an avoption
Martin Storsjö [Mon, 3 Nov 2014 20:38:09 +0000 (22:38 +0200)]
movenc: Expose the fragment index as an avoption

This allows setting the right fragment number if doing
random-access writing of fragments, and also allows reading the
current sequence number.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agomovenc: Add a flag for indicating a discontinuous fragment
Martin Storsjö [Thu, 20 Nov 2014 07:51:05 +0000 (09:51 +0200)]
movenc: Add a flag for indicating a discontinuous fragment

This allows creating a later mp4 fragment without sequentially
writing the earlier ones before (when called from a segmenter).

Normally when writing a fragmented mp4 file sequentially, the
first timestamps of a fragment are adjusted to match the
end of the previous fragment, to make sure the timestamp is the
same, even if it is calculated as the sum of previous fragment
durations. (And for the first packet in a file, the offset of
the first packet is written using an edit list.)

When writing an individual mp4 fragment discontinuously like this
(with potentially writing the earlier fragments separately later),
there's a risk of getting a gap in the timeline if the duration
field of the last packet in the previous fragment doesn't match up
with the start time of the next fragment.

Using this requires setting -avoid_negative_ts make_non_negative
(or -avoid_negative_ts 0).

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agovorbis_parser: Include stdint.h in the header, to make it work standalone
Martin Storsjö [Tue, 25 Nov 2014 08:43:55 +0000 (10:43 +0200)]
vorbis_parser: Include stdint.h in the header, to make it work standalone

This fixes "make checkheaders".

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agovf_interlace: x86: improve asm performance
Michael Niedermayer [Sat, 15 Nov 2014 03:07:08 +0000 (04:07 +0100)]
vf_interlace: x86: improve asm performance

4775 decicycles -> 3688 decicycles

9 years agohnm4: change width/height to int to fix hypothetical integer overflows
Michael Niedermayer [Wed, 12 Nov 2014 10:13:08 +0000 (11:13 +0100)]
hnm4: change width/height to int to fix hypothetical integer overflows

CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771

9 years agohnm4: Use av_image_check_size
Luca Barbato [Mon, 24 Nov 2014 00:04:39 +0000 (01:04 +0100)]
hnm4: Use av_image_check_size

As done for all the other codecs not calling it indirectly.

CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771

9 years agovc1: Use the correct shift amount
Michael Niedermayer [Sun, 23 Nov 2014 23:44:48 +0000 (00:44 +0100)]
vc1: Use the correct shift amount

`is_intra` is a 6bits bitfield.

CC: libav-stable@libav.org
Bug-Id: CID 1194380 / CID 1194381

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agovc1: Set the is_intra bitfield to all 1 when needed
Luca Barbato [Sun, 23 Nov 2014 23:44:47 +0000 (00:44 +0100)]
vc1: Set the is_intra bitfield to all 1 when needed

Keep the code as similar as possible across the codepaths to
ease spotting it for factorization.

Based on a patch from Michael Niedermayer <michaelni@gmx.at>.

9 years agovc1: Simplify a little setting the intra variables
Luca Barbato [Sun, 23 Nov 2014 23:44:46 +0000 (00:44 +0100)]
vc1: Simplify a little setting the intra variables

The code currently set the information in at least 4 places, spare
some pointless loops.

Make the code in the loop a little uniform to make easier factorize
it out later.

9 years agovorbis_parser: Move vp check to avoid a null pointer dereference
Michael Niedermayer [Mon, 24 Nov 2014 15:48:27 +0000 (15:48 +0000)]
vorbis_parser: Move vp check to avoid a null pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 1251347

9 years agolpc: remove unneeded {}
Michael Niedermayer [Mon, 24 Nov 2014 16:06:00 +0000 (16:06 +0000)]
lpc: remove unneeded {}

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovc1pred: remove logically dead code
Vittorio Giovara [Mon, 24 Nov 2014 01:38:53 +0000 (01:38 +0000)]
vc1pred: remove logically dead code

CC: libav-stable@libav.org
Bug-Id: CID 1245699 / CID 1245700

9 years agolavf: Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlink
Martin Storsjö [Mon, 17 Nov 2014 21:08:15 +0000 (23:08 +0200)]
lavf: Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlink

This makes sure that the internal utf8 path names are handled
properly - the normal file handling functions assume path names
are in the native codepage, which isn't utf8.

This assumes that the tools outside of lavf don't use the mkdir
definition. (The tools don't do the same reading of command line
parameters as wchar either - they probably won't handle all possible
unicode file parameters properly, but at least work more predictably
if no utf8/wchar conversion is involved.)

This is moved further down in os_support.h, since windows.h shouldn't
be included before winsock2.h, while io.h needs to be included before
the manual defines for lseek functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agolavf: Don't try to update files atomically with renames on windows
Martin Storsjö [Tue, 18 Nov 2014 12:06:19 +0000 (14:06 +0200)]
lavf: Don't try to update files atomically with renames on windows

On windows, rename(2) will fail if the target file exists. On
unix this trick is used to make sure that people reading the file
either will get the full previous file, or the full new version
of the file, but no intermediate version.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoflvdec: Document how the duration is retrieved at the end of the file
Uwe L. Korn [Sun, 23 Nov 2014 18:36:14 +0000 (19:36 +0100)]
flvdec: Document how the duration is retrieved at the end of the file

Signed-off-by: Martin Storsjö <martin@martin.st>