Commit Graph

40885 Commits

Author SHA1 Message Date
Michael Niedermayer
02484d1a93 avio: fix sizeof argument
CC: libav-stable@libav.org
Bug-Id: CID 732284
2014-10-20 10:38:38 +01:00
Vittorio Giovara
8ab3b71e4b idcin: fix return check
CC: libav-stable@libav.org
Bug-Id: CID 732198
2014-10-20 10:38:37 +01:00
Alexander Drozdov
0034314a69 rtmp: Always call rtmp_close() on rtmp_open() failure
Prevent possible memory leaks.

Connect to nginx and request a non-existent resource to
trigger the issue.

CC: libav-stable@libav.org

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Uwe L. Korn <uwelk@xhochy.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-10-18 17:37:11 +02:00
Vittorio Giovara
fc1eda543c swscale: fix sign extensions in yuv planar conversion
Casting the left-most byte to unsigned avoids an undefined
result of the shift by 24 if bit 7 is set.

yuvPlanartouyvy_c and yuvPlanartoyuy2_c are affected.

CC: libav-stable@libav.org
Bug-Id: CID 732281 / CID 732282
2014-10-18 16:15:10 +01:00
Timothy Gu
b7c77912b6 oss_audio: use a macro to simplify ioctl() error checking
Also add a note about SNDCTL_DSP_GETFMTS which may fail even if OSS is
available.

CC: libav-stable@libav.org
Bug-Id: CID 1238992
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-10-18 16:15:10 +01:00
Luca Barbato
963f761448 avresample: Make sure the even check does not overflow
CC: libav-stable@libav.org
Bug-Id: CID 732225
2014-10-18 16:15:10 +01:00
Vittorio Giovara
088eca2816 avresample: prevent theoretical division by zero
CC: libav-stable@libav.org
Bug-Id: CID 1231986
2014-10-18 16:15:10 +01:00
Vittorio Giovara
0d989dbfc4 af_resample: check av_opt_set_dict return value
CC: libav-stable@libav.org
Bug-Id: CID 1087076
2014-10-18 16:15:10 +01:00
Vittorio Giovara
6d96c7ea89 vf_showinfo: Forward the av_image_get_linesize error
CC: libav-stable@libav.org
Bug-Id: CID 1087086
2014-10-18 16:15:10 +01:00
Luca Barbato
f401792595 vf_drawtext: Do not leak the mmapped textfile
And validate its size while at it.

CC: libav-stable@libav.org
Bug-Id: CID 1244189
2014-10-18 16:15:09 +01:00
Anton Khirnov
530c1441fd lavc: make lmax/lmin into private options of mpegvideo encoders 2014-10-18 05:29:14 +02:00
Anton Khirnov
15ec053c4c lavc: make border_masking into private options of mpegvideo encoders 2014-10-18 05:28:40 +02:00
Anton Khirnov
c4f7bee087 lavc: deprecate unused mb_threshold field 2014-10-18 05:28:29 +02:00
Anton Khirnov
685be3d1ae libvpxenc: add static-thresh private option
Currently, this option is accessed through AVCodecContext.mb_threshold,
which originally controlled reusing MB data when transcoding mpeg to
mpeg. Since the libvpx meaning is completely different from the original
mpegvideo meaning, it is better to use a separate private option for
this.
2014-10-18 05:28:03 +02:00
Anton Khirnov
59b55c494e lavc: deprecate unused me_threshold field 2014-10-18 05:26:56 +02:00
Anton Khirnov
66a68ddd1a lavc: make rc_buffer_aggressivity/rc_initial_cplx into private options of mpegvideo encoders 2014-10-18 05:26:29 +02:00
Anton Khirnov
a75c2eb25a lavc: make rc_eq into private options of mpegvideo encoders 2014-10-18 05:23:51 +02:00
Anton Khirnov
946f95354b lavc: make rc_qmod_* into private options of mpegvideo encoders 2014-10-18 05:23:05 +02:00
Anton Khirnov
a6e4ce9fd5 lavc: make rc_qsquish a private option of mpegvideo encoders 2014-10-18 05:21:50 +02:00
Timothy B. Terriberry
6cbbf0592f resample: Avoid off-by-1 errors in PTS calcs.
The rounding used in the PTS calculations in filter_frame() does
not actually match the number of samples output by the resampler.
This leads to off-by-1 errors in the timestamps indicating gaps and
underruns, even when the input timestamps are all contiguous.

Bug-Id: 753

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-18 05:01:59 +02:00
Anton Khirnov
fb238f8230 urlprotocol: remove unused url_interrupt_cb declaration
It is a remnant of the old interrupt callback API.
2014-10-18 05:01:20 +02:00
Uwe L. Korn
9bec3ca2b8 rtmpproto: Add pause support
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-17 23:13:51 +03:00
Uwe L. Korn
f4cd8b80b9 rtmpproto: Track last received timestamp
Some RTMP commands need the most recent timestamp as their parameter, so
keep track of it. This must be the most recent one and not e.g. the max
received timestamp as it can decrease again through seeking.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-17 23:13:37 +03:00
Vittorio Giovara
bae557edce dump: display codec tags when available
For both audio and video.
2014-10-17 14:45:07 +01:00
Omer Osman
66e9f83953 libfdk-aacdec: Enable Dynamic Range Control Metadata Support
For streams which contain DRC metadata, the FDK decoder is able to
control rendering of the decoded output. The rendering parameters
are detailed in fdk_aac_dec_options [].

The default behavior is left up to the decoder.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-17 15:48:31 +03:00
Omer Osman
b01a2204b5 libfdk-aacdec: Enable Decoder Downmix including Downmix Metadata Support
The FDK decoder is capable of producing mono and stereo downmix from
multichannel streams. These streams may contain metadata that control
the downmix process. The decoder requires an Ancillary Buffer in order to
correctly apply downmix in streams containing downmix Metadata. The
decoder does not have an API interface to inform of the presence of
Metadata in the stream, and therefore the Ancillary Buffer is always
allocated whenever a downmix is requested.

When downmixing multichannel streams, the decoder requires the output
buffer in aacDecoder_DecodeFrame call to be of fixed size in order to
hold the actual number of channels contained in the stream. For example,
for a 5.1ch to stereo downmix, the decoder requires that the output buffer
is allocated for 6 channels, regardless of the fact that the output is in
fact two channels.

Due to this requirement, the output buffer is allocated for the maximum
output buffer size in case a downmix is requested (and also during
decoder init). When a downmix is requested, the buffer used for output
during init will also be used for the entire duration the decoder is open.
Otherwise, the initial decoder output buffer is freed and the decoder
decodes straight into the output AVFrame.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-17 15:48:30 +03:00
Uwe L. Korn
e65c776d18 rtmpproto: Add getStreamLength call to query duration
In (non-live) streams with no metadata, the duration of a stream can
be retrieved by calling the RTMP function getStreamLength with the
playpath. The server will return a positive duration upon the request if
the duration is known, otherwise either no response or a duration of 0
will be returned.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-17 12:07:19 +03:00
Uwe L. Korn
324b23dde1 rtmpproto: Add function to read a number response
Packets that contain a number as a result to a rtmp function call are
structured the same way (String, Number, Null, Number). This new method
also includes more bounds checks to better handle packets that are not
structured as expected.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-17 12:07:19 +03:00
Luca Barbato
47e3e1097e cmdutils: Use the correct guard
The OptionDef arrays are terminated with a { NULL } element not NULL.

CC: libav-stable@libav.org
Bug-Id: CID 703769
2014-10-17 09:55:46 +01:00
Luca Barbato
0db6bbb24c avformat: Make avformat_free_context handle NULL
Work as the other free()-like functions.

Bug-Id: CID 1087081
CC: libav-stable@libav.org
2014-10-17 09:55:46 +01:00
Vittorio Giovara
c92965dbfb avconv: check return value
CC: libav-stable@libav.org
Bug-Id: CID 1224275
2014-10-17 09:55:46 +01:00
Vittorio Giovara
c802a2e718 avconv: fix leak in filter error
CC: libav-stable@libav.org
Bug-Id: CID 1005311
2014-10-17 09:55:46 +01:00
Luca Barbato
aeb23fc454 avprobe: Remove a pointless check
The element is always valid.

CC: libav-stable@libav.org
Bug-Id: CID 732276
2014-10-17 09:55:46 +01:00
Luca Barbato
e58a140cf9 avplay: Always free opts
CC: libav-stable@libav.org
Bug-Id: CID 733793
2014-10-17 09:55:46 +01:00
Luca Barbato
cf83c01739 avplay: Always free find_stream_info options
CC: libav-stable@libav.org
Bug-Id: CID 1238794
2014-10-17 09:55:46 +01:00
Janne Grunau
f29c226af0 fate: add mpeg4 tests for frame size changes 2014-10-17 09:58:31 +02:00
Mika Raento
979932378a ismindex: use tfhd default duration if no sample duration
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-16 09:22:22 +03:00
Michael Lynch
460b509a34 rtsp: Check a memory allocation
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-16 09:19:03 +03:00
Martin Storsjö
79dd756e14 rtmpproto: Fix a typo
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-15 21:00:39 +03:00
Martin Storsjö
ced7238cd0 rtpdec_hevc: Use av_realloc instead of av_malloc+memcpy
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-15 20:54:32 +03:00
Martin Storsjö
752e71e74f rtpdec_hevc: Rename a variable for clarity
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-15 20:54:30 +03:00
Vittorio Giovara
74b0237798 mov: Correctly check the color transfer characteristics range
Reported-by: Ruoyu <liangry@ucweb.com>
2014-10-15 14:48:40 +01:00
Vittorio Giovara
1ac5a29b2e imc: fix order of operations in coefficients read
Reported-by: Ruoyu <liangry@ucweb.com>
2014-10-15 14:48:07 +01:00
Martin Storsjö
e5cfc8fdad sdp: Provide out of bound parameter sets for HEVC if extradata is set
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-15 12:12:54 +03:00
Martin Storsjö
9b7f932ee5 rtpdec_hevc: Parse out of band vps/sps/pps/sei from fmtp lines
These are assembled into extradata in the order vps/sps/pps/sei.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-15 12:12:02 +03:00
Anton Khirnov
557d4c4eca avconv: replace AVCodecContext.time_base with framerate 2014-10-15 06:38:16 +00:00
Anton Khirnov
2d6e58497e lavf: switch to AVCodecContext.framerate for demuxing 2014-10-15 06:37:55 +00:00
Anton Khirnov
7ea1b3472a lavc: deprecate the use of AVCodecContext.time_base for decoding
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.

Add a new field, called 'framerate', to replace the use of time_base for
decoding.
2014-10-15 06:37:43 +00:00
Rémi Denis-Courmont
d565fef1b8 vdpau: add AV_HWACCEL_FLAG_IGNORE_LEVEL to skip the codec level check
Decoding acceleration may work even if the codec level is higher than
the stated limit of the VDPAU driver. Or the problem may be considered
acceptable by the user. This flag allows skipping the codec level
capability checks and proceed with decoding.

Applications should obviously not set this flag by default, but only if
the user explicitly requested this behavior (and presumably knows how
to turn it back off if it fails).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-15 06:21:56 +00:00
Rémi Denis-Courmont
c1724623ce vdpau: have av_vdpau_bind_context() fail on unsupported flag
Currently, no flags are supported.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-15 06:21:47 +00:00