Vittorio Giovara
cce99f72d1
mpegenc: prevent a NULL pointer dereference
...
CC: libav-stable@libav.org
Bug-Id: CID 29261
(cherry picked from commit 065923b078
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-13 00:16:40 +01:00
Vittorio Giovara
fbc20c3b85
aacdec: avoid an out-of-bounds write
...
Also move the check in the case it is actually used.
CC: libav-stable@libav.org
Bug-Id: CID 1087090
(cherry picked from commit b99ca86350
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-13 00:16:40 +01:00
Luca Barbato
484e015dc8
cook: Make sure there is enough extradata
...
At least 8 bytes are needed (Mono audio).
Bug-Id: CID 741418
CC: libav-stable@libav.org
(cherry picked from commit 299d8ab104
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-13 00:16:40 +01:00
Vittorio Giovara
b82170336f
tiffenc: initialize return value
...
'ret' can only be used without initialization if s->height <= 0, which can
only happen if avctx->height <= 0, which is validated elsewhere. Doesn't hurt
to still initialize it though.
CC: libav-stable@libav.org
Bug-Id: CID 732296
(cherry picked from commit 0562887a98
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-13 00:16:40 +01:00
Michael Niedermayer
12e1a7013a
roqaudio: Always use the frame buffer on flush
...
Prevent NULL dereference.
CC: libav-stable@libav.org
Bug-Id: CID 703669
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com >
(cherry picked from commit 55b59fab88
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-13 00:16:40 +01:00
Luca Barbato
e7ee74485b
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
2015-01-13 00:09:37 +01:00
Vittorio Giovara
4edbb0955e
png_parser: fix size of chunk_lenght
...
Fixes the comparison against constant value 0x7fffffff.
CC: libav-stable@libav.org
Bug-Id: CID 1198260
2015-01-13 00:06:40 +01:00
Michael Niedermayer
2a75c0b1ca
aacsbr: change order of operation to prevent out of array read
...
CC: libav-stable@libav.org
Bug-Id: CID 732250
2015-01-13 00:06:07 +01:00
Vittorio Giovara
34e7f70f9f
assdec: check av_new_packet return value
...
CC: libav-stable@libav.org
Bug-Id: CID 703626
2015-01-13 00:05:39 +01:00
Vittorio Giovara
242fc6394f
mtv: improve header check and avoid division by zero
...
CC: libav-stable@libav.org
Bug-Id: CID 732203 / CID 732204
2015-01-13 00:05:27 +01:00
Vittorio Giovara
bae05e5326
matroskaenc: write correct Display{Width, Height} in stereo encoding
...
should be the raw amount of pixels (for example 3840x1080 for full HD side by
side) and the DisplayWidth/Height in pixels should be the amount of pixels for
one plane (1920x1080 for that full HD stream)."
So, move the aspect ratio check in the mkv_write_stereo_mode() function
and always write the embl when stereo format and/or aspect ration is set.
Also add a few comments to that function.
CC: libav-stable@libav.org
Found-by: Asan Usipov <asan.usipov@gmail.com >
2015-01-13 00:05:13 +01:00
Vittorio Giovara
26ba78adac
mov: fix assigment check
...
CC: libav-stable@libav.org
Bug-Id: CID 1197050
2015-01-13 00:04:56 +01:00
Vittorio Giovara
8a982092cc
mxfdec: add missing break
...
CC: libav-stable@libav.org
Bug-Id: CID 732232
2015-01-13 00:04:43 +01:00
Luca Barbato
19fc283dbb
lavf: replace rename() with ff_rename()
...
The new function wraps errno so that its value is correctly reported
when other functions overwrite it (eg. in case of logging).
CC: libav-stable@libav.org
Bug-Id: CID 1135748
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com >
2015-01-13 00:04:24 +01:00
Vittorio Giovara
b9b689550e
img2dec: check av_new_packet return value
...
CC: libav-stable@libav.org
Bug-Id: CID 1087077
2015-01-13 00:03:10 +01:00
Vittorio Giovara
7c710c38f6
audiointerleave: check av_new_packet return value
...
CC: libav-stable@libav.org
Bug-Id: CID 1087078
2015-01-13 00:02:45 +01:00
Vittorio Giovara
a7e79f6a43
avfilter: check filter link validity
...
Remove now redundant check.
CC: libav-stable@libav.org
Bug-Id: CID 700371
2015-01-13 00:02:32 +01:00
Anton Khirnov
556a5090f2
mp3dec: fix reading the Xing tag
...
The quality scale field is only supposed to be present if the fourth bit
is set. In practice, lame always sets it, but other tools might not.
CC:libav-stable@libav.org
2015-01-13 00:02:16 +01:00
Vittorio Giovara
1551602b42
nutdec: check av_new_packet return value
...
CC: libav-stable@libav.org
Bug-Id: CID 733713
2015-01-13 00:01:33 +01:00
Vittorio Giovara
4cd0041d38
rmdec: check av_new_packet return value
...
CC: libav-stable@libav.org
Bug-Id: CID 733714
2015-01-13 00:01:18 +01:00
Vittorio Giovara
d1ad85fc02
vf_format: check input validity
...
CC: libav-stable@libav.org
2015-01-13 00:01:08 +01:00
Vittorio Giovara
6cf27b550d
aviobuf: check context before using it
...
Avoid a possible null pointer dereference.
CC: libav-stable@libav.org
Bug-Id: CID 1135769
2015-01-13 00:00:56 +01:00
Michael Niedermayer
5aceced0a0
avio: fix sizeof argument
...
CC: libav-stable@libav.org
Bug-Id: CID 732284
2015-01-13 00:00:43 +01:00
Vittorio Giovara
27487944ef
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
2015-01-13 00:00:28 +01:00
Timothy Gu
51f76e4e93
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 >
2015-01-13 00:00:17 +01:00
Luca Barbato
c246b0b4c3
avresample: Make sure the even check does not overflow
...
CC: libav-stable@libav.org
Bug-Id: CID 732225
2015-01-12 23:59:59 +01:00
Vittorio Giovara
daef7feb09
af_resample: check av_opt_set_dict return value
...
CC: libav-stable@libav.org
Bug-Id: CID 1087076
2015-01-12 23:59:48 +01:00
Vittorio Giovara
2496dbd68b
vf_showinfo: Forward the av_image_get_linesize error
...
CC: libav-stable@libav.org
Bug-Id: CID 1087086
2015-01-12 23:59:32 +01:00
Luca Barbato
608e8d8dd7
vf_drawtext: Do not leak the mmapped textfile
...
And validate its size while at it.
CC: libav-stable@libav.org
Bug-Id: CID 1244189
2015-01-12 23:59:15 +01:00
Luca Barbato
4d48691622
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
2015-01-12 23:58:58 +01:00
Luca Barbato
bb823e26b1
avformat: Make avformat_free_context handle NULL
...
Work as the other free()-like functions.
Bug-Id: CID 1087081
CC: libav-stable@libav.org
2015-01-12 23:58:25 +01:00
Michael Lynch
b31bb39bdd
rtsp: Check a memory allocation
...
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st >
2015-01-12 23:58:05 +01:00
Luca Barbato
036f5c5420
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 >
2015-01-12 23:18:01 +01:00
Luca Barbato
da35008c31
latm: Do not give a score for a single instance
...
Bug-Id: 773
CC: libav-stable@libav.org
2015-01-12 23:18:01 +01:00
Luca Barbato
4baee1124b
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
2015-01-12 23:18:01 +01:00
Vittorio Giovara
bbb86717b3
vf_frei0r: do not increment string if it reached the end
...
Bug-Id: 778
CC: libav-stable@libav.org
2015-01-12 23:18:01 +01:00
Michael Niedermayer
1fd55ec507
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 7b588bb691
.
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 >
2015-01-12 23:16:05 +01:00
Thiago Santos
20f9cf744a
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 >
2015-01-12 23:16:05 +01:00
Vittorio Giovara
20d6ae4626
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
2015-01-12 23:16:05 +01:00
Luca Barbato
23fe589e19
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 >
2015-01-12 23:15:19 +01:00
Luca Barbato
9bd4561d74
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 >
2015-01-12 23:15:03 +01:00
Martin Storsjö
cbf31d5f15
rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data
...
If we throw away the buffered incomplete frame, make sure to also
throw away the buffered bits of an incomplete byte at the same
time.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st >
(cherry picked from commit df07c07b3d
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-12 23:14:38 +01:00
Michael Niedermayer
21683549ed
h261dec: Fix context initialization sequence
...
ff_mpv_common_init sets s->context_initialized.
This fixes decoding of h261 in the cases where the demuxer
hasn't already set the frame size.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st >
(cherry picked from commit 3bb465245f
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-12 23:14:26 +01:00
Vittorio Giovara
cbfdbba58e
cmdutils: check file access functions return values
...
CC: libav-stable@libav.org
Bug-Id: CID 703706
(cherry picked from commit 38129c26c5
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-12 23:14:06 +01:00
Vittorio Giovara
1411f073fd
aacenc: correctly check returned value
...
CC: libav-stable@libav.org
(cherry picked from commit 971099ff5a
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-12 23:12:25 +01:00
Vittorio Giovara
76e9a17f33
lavfi: always check av_expr_parse_and_eval() return value
...
CC: libav-stable@libav.org
Bug-Id: CID 703624
(cherry picked from commit 63be97ec40
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-12 23:12:10 +01:00
Alexandre Colucci
3d0752d82f
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 >
(cherry picked from commit 5a1addd7c1
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-12 22:23:35 +01:00
Anton Khirnov
bfe18be88a
mpeg4audio: check the init_get_bits() return value
...
Fixes possible invalid reads.
CC:libav-stable@libav.org
(cherry picked from commit 7e4e010b80
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-12 22:21:54 +01:00
Luca Barbato
f6c82b34a3
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
(cherry picked from commit b3f0465736
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-12 22:21:39 +01:00
Vittorio Giovara
3280b86c85
swscale: check memory allocations
...
CC: libav-stable@libav.org
Bug-Id: CID 1257779
(cherry picked from commit 1dd797e3c9
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2015-01-12 22:19:55 +01:00