Commit Graph

41262 Commits

Author SHA1 Message Date
Michael Niedermayer ea3fc9fe68 smoothstreamingenc: Add a missing "goto fail"
This goto wasn't necessary originally, but it should have been
added when the write_manifest call was added in 8e276378.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-19 22:31:08 +02:00
Nidhi Makhijani 3941df5462 aea: Return proper error code on invalid header 2015-01-16 10:35:02 +01:00
Vittorio Giovara 2df7277711 swscale: fix gbrap to gbrap alpha scaling 2015-01-16 02:47:15 +01:00
Vittorio Giovara 89df3fd49e swscale: fix warning about incompatible function pointer type 2015-01-16 02:47:10 +01:00
Martin Storsjö 024e5a2d5f rtmppkt: Repeat the full 32 bit timestamp for chunking continuation packets
This fixes sending chunked packets (packets larger than the output
chunk size, which often can be e.g. 4096 bytes) with a timestamp delta
(or absolute timstamp, if it's a timestamp step backwards, or the
first packet of the stream) larger than 0xffffffff.

The RTMP spec explicitly says (in section 5.3.1.3.) that packets of
type 3 (continuation packets) should include this field, if the
previous non-continuation packet had it included.

The receiving code handles these packets correctly.

Pointed out by Cheolho Park.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-15 10:20:18 +02:00
Michael Niedermayer def69553e7 h264_cabac: Break infinite loops
This fixes out of array reads and/or infinite loops.

30 is the maximum number of bits that can be read into
coeff_abs below.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-15 10:17:01 +02:00
Vittorio Giovara 402fb5550e opus_parser: drop unused variable 2015-01-15 01:25:16 +01:00
Vittorio Giovara 8a9641a652 bsf: check memory allocations 2015-01-15 01:25:16 +01:00
Vittorio Giovara 014b6b416f vp8: improve memory allocation checks
Check memory earlier, check one more allocation and clean up on error.

CC: libav-stable@libav.org
Bug-Id: CID 1257773
2015-01-15 01:25:07 +01:00
Anton Khirnov 54bc15d5eb id3v2: fix reading v2.2 attached pictures
In v2.2, the picture type is not a zero-terminated string, but has a
constant size of 3 bytes.
2015-01-14 17:17:24 +01:00
Anton Khirnov 932788be5a id3v2: add names to the parameters of ID3v2EMFunc.read
Some of them are not immediately obvious.
2015-01-14 17:17:24 +01:00
Anton Khirnov 8809c974a3 id3v2: constify the 'tag' parameter to special metadata parsing callback
Those functions should not ever modify it.
2015-01-14 17:17:24 +01:00
Paul B Mahol f86f39cb9b tiff: support decoding GBRP and GBRAP formats
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:24 +01:00
Paul B Mahol 928061670e libswscale: GBRAP input & output and GBRAP16 input support
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:24 +01:00
Paul B Mahol 9a4aaae3b2 lavc: add GBRAP to avcodec_align_dimensions2 2015-01-14 17:17:24 +01:00
Paul B Mahol 0e6c7dfa65 lavu: add planar 16 bit and 8 bit rgb with alpha
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:24 +01:00
Stefano Sabatini e2ad0b66fa imgutils: create misc functions for dealing with buffers
Move the lavc/imgconvert functions and rename them as follows:
  avpicture_get_size -> av_image_get_buffer_size()
  avpicture_fill     -> av_image_fill_arrays()
  avpicture_layout   -> av_image_copy_to_buffer()

The new functions have an align parameter, which allows to define the
linesize alignment assumed in the buffer (which is set or read).

The names of the functions are consistent with the lavu/samples API
(av_samples_get_buffer_size(), av_samples_fill_arrays()).

A redundant check has been dropped from av_image_fill_arrays().

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:24 +01:00
Vittorio Giovara cf70ba37ba mov: Check angle rather than full matrix when updating SAR
When the display matrix is not the identity one, but the rotation angle
is zero, there is no need to update the sample aspect ratio.

Otherwise, it is possible to obtain negative values which interferes
with transcoding in later stages. This kind of behaviour is reproducible
on mov files with "major_brand: MSNV".

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:23 +01:00
Vittorio Giovara 1e76345432 png: improve signature check
Return proper error code, print an error message and add missing
parentheses.
2015-01-14 17:10:19 +01:00
Vittorio Giovara 456ffec35d img2dec: correctly use the parsed value from -start_number
Previously the image sequence was always starting from the minimum
number rather than the requested one.

CC: libav-stable@libav.org
2015-01-14 17:10:01 +01:00
Anton Khirnov 51da7d0274 matroskaenc: refuse to write AAC without valid extradata 2015-01-09 15:51:00 +01:00
Anton Khirnov 7e4e010b80 mpeg4audio: check the init_get_bits() return value
Fixes possible invalid reads.

CC:libav-stable@libav.org
2015-01-09 15:44:31 +01:00
Martin Storsjö 2dbd35b00c libfdk-aacdec: Make sure decoding doesn't add any extra delay in the latest version of fdk-aac
The latest version added support for a new option for enabling
a signal level limiter, which adds some extra delay. In fdk-aac, this
is enabled by default, but disable it by default here since we'd rather
have zero-delay decoding.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-08 13:58:43 +02:00
Martin Storsjö 3852e2c926 libopenh264enc: Fix a typo and some nitpicks
Also move the .long_name entry to below the .name entry.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-08 13:53:25 +02:00
Martin Storsjö 71ec3d36fa doc: Add initial documentation about the OpenH264 encoder wrapper
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-08 13:53:15 +02:00
Alexandre Colucci 5a1addd7c1 xsub: Support DXSA subtitles
These have a DXSA tag and contain alpha in addition to
color values for palette.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-07 13:51:30 +01:00
Luca Barbato 01168bf140 mpeg: Remove unused field 2015-01-07 13:49:10 +01:00
Luca Barbato b3f0465736 segment: Fix the failure paths
A failure in segment_end() or segment_start() would lead to freeing
a dangling pointer and in general further calls to seg_write_packet()
or to seg_write_trailer() would have the same faulty behaviour.

CC: libav-stable@libav.org
Reported-By: luodalongde@gmail.com
2015-01-07 12:36:28 +01:00
Martin Storsjö 8a3d9ca603 libavcodec: Add an OpenH264 encoder wrapper
Compared to existing, common opensource H264 encoders, this can be
useful since it has got a different license (BSD instead of GPL).

Performance- and qualitywise it is comparable to x264 in ultrafast
mode.

Hooking it up as an encoder in libavcodec also simplifies comparing
it against other common encoders.

This requires OpenH264 1.3 or newer. Since the OpenH264 API and ABI
changes frequently, only releases are supported.

To take advantage of the OpenH264 patent offer, the OpenH264 library
must not be redistributed, but downloaded at runtime at the end-user's
system.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-06 19:58:44 +02:00
Martin Storsjö 2a1500fb55 movenc: Fix a typo in a comment
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-06 19:47:18 +02:00
Martin Storsjö e581e88cbd movenc: Readd an accidentally removed condition
This was removed accidentally as part of 847bf598. This could cause
groundless warning logging.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-06 19:47:09 +02:00
Justin Ruggles 8e03ca2fff isom: add 'mp1v' fourcc
As referenced in the CoreMedia API docs.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-06 17:05:53 +01:00
Vittorio Giovara 1c6183233d msmpeg4: check memory allocations and propagate errors
Bug-Id: CID 1257781
2015-01-06 16:43:54 +01:00
Vittorio Giovara ed97963bdb ulti: invert the order of parameters of ulti_decode_frame()
This is the order that the caller uses in the rest of the file.
Variables are modified to reflect the order above too and their
initialization is merged with their declarationt. No behavioral
change.

Bug-Id: CID 732286
2015-01-06 16:43:53 +01:00
Vittorio Giovara 4438c25638 vf_interlace: remove the warning tag in the message
The log level is already a warning.
2015-01-05 15:35:46 +01:00
Vittorio Giovara 15ea222778 vf_interlace: merge FIELD_LOWER check 2015-01-05 15:35:46 +01:00
Vittorio Giovara 046f75a970 vf_interlace: also assert for height 2015-01-05 15:35:46 +01:00
Vittorio Giovara 696141e898 vf_interlace: use image width rather than linesize
Based on a patch by Michael Niedermayer <michaelni@gmx.at>.
2015-01-05 15:35:46 +01:00
Agostino Sarubbo fe08299868 build: Use -Werror=format-security
Reduce the chance of introducing a class of bugs quite hard to track.
2015-01-05 15:35:39 +01:00
Stefano Pigozzi 2cef68da69 vda: error out if decoded CVPixelBuffer is empty
On some video samples, VDA silently fails to decode frames and returns
kVDADecoderNoErr. Error out in these cases to avoid producing AVFrames with
empty planes.

Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
2015-01-05 15:35:39 +01:00
Diego Biurrun 0352ff102d ffv1: const correctness for encode_rgb_frame()
libavcodec/ffv1enc.c:922:53: warning: passing argument 5 of ‘encode_rgb_frame’ discards ‘const’ qualifier from pointer target type
2015-01-05 15:35:39 +01:00
Diego Biurrun ca09effb01 ffv1: Drop unnecessary casts and const qualifiers to match function signatures
libavcodec/ffv1dec.c:898:36: warning: cast discards ‘const’ qualifier from pointer target type
2015-01-05 15:35:39 +01:00
Vittorio Giovara 1dd797e3c9 swscale: check memory allocations
CC: libav-stable@libav.org
Bug-Id: CID 1257779
2015-01-05 15:35:39 +01:00
Vittorio Giovara 07a0c0f000 opt: check memory allocation
CC: libav-stable@libav.org
Bug-Id: CID 1257771
2015-01-05 14:58:20 +01:00
Martin Storsjö 46808fdf04 movenc: Enable editlists by default if delay_moov is enabled
Being able to write editlists properly is one of the main points
in the delay_moov flag.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-04 20:04:36 +02:00
Martin Storsjö 9f810a9b37 libavformat: Check for malloc failures in avformat_new_stream
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-04 20:04:36 +02:00
Martin Storsjö c4aa0f865f libavformat: Remove a misleading/incorrect comment
This comment can be traced back to the initial commit from 2001,
and it seemed to be misleading/incorect already back then. (It
was used for normal, non-raw file formats already then.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-04 20:04:33 +02:00
Martin Storsjö f4d4e66a24 configure: Remap -L to -libpath for msvc
This allows using libraries that are detected via pkg-config with
msvc. (The libraries themselves may have to be built with MSVC
though.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-04 19:57:34 +02:00
Johan Andersson 3e16065221 cmdutils: update copyright year to 2015.
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-04 13:22:25 +02:00
Martin Storsjö f2ad1495f2 avisynth: Use RTLD_LOCAL instead of RTLD_GLOBAL
There shouldn't be any need to add the loaded libraries to the global
symbol namespace.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-03 02:30:03 +02:00