Commit Graph

36290 Commits

Author SHA1 Message Date
Carl Eugen Hoyos
93e041026f lavc: Enable a53cc by default for x264 and qsv_h264. 2016-09-14 17:52:50 +02:00
Michael Niedermayer
a5af1240fc avcodec/g726: Add missing ADDB output mask
Fixes: 1.poc
Fixes out of array read

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-14 15:50:07 +02:00
Jonathan Campbell
c19da0cfd8 avcodec/mpeg12dec: add comments documenting the format of the DVD CC user-data packet.
this is to aid development and maintenance of that code.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-13 04:53:28 +02:00
Michael Niedermayer
5e1bf9d8c0 avcodec/avpacket: clear side_data_elems
Fixes null pointer dereference

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-12 23:53:07 +02:00
Rodger Combs
dca03ec5f4
ass_split: reindent 2016-09-12 15:57:51 -05:00
Rodger Combs
3b32e1313c
ass_split: fix handling of streams with no [Events] or Format: line 2016-09-12 15:57:50 -05:00
Michael Niedermayer
5bbffe3412 avcodec/h264_refs: Change default case to av_assert0() to suppress warning
Should fix "libavcodec/h264_refs.c:372:13: warning: variable 'i' is used uninitialized whenever switch default is taken"

Found-by: durandal_17
Suggested-by: jkqxz
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-12 12:33:44 +02:00
Matthieu Bouron
025f75c3ad lavc/ffjni: do not error out if the last non-mandatory field/method cannot be found 2016-09-12 09:56:37 +02:00
Jens Ziller
bc7066fd5d libavcodec/mmaldec.c: set AVFrame interlaced_frame and top_field_first, AVCodecContext framerate
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-12 01:14:07 +02:00
Philip Langdale
4029f05c8b avcodec/cuvid: Always check for internal errors during parsing
The cuvid parser is basically undocumented, and although you'd
think that a failed callback would result in the overall parse
call returning an error, that is not true.

So, we end up silently trying to keep going as if nothing is wrong,
which doesn't achieve anything.

Solution: check the internal error flag every time.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2016-09-10 22:27:24 +02:00
Rodger Combs
7c5fed15a8
lavc/Makefile: add missing ADPCM_THP_LE objs 2016-09-09 20:07:55 -05:00
Rodger Combs
1177e42121
lavc/Makefile: g729dec: fix missing file 2016-09-09 20:07:55 -05:00
Timo Rothenpieler
b91e0e5987 avcodec/cuvid: check for and warn about invalid pkt_timebase 2016-09-09 17:56:07 +02:00
Timo Rothenpieler
132adf73af avcodec/cuvid: use pkt_timebase instead of time_base 2016-09-09 17:56:07 +02:00
Thilo Borgmann
4d48add89b lavc/alsdec: use get_bitsz() to simplify reading of the mantissa
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-09 11:50:12 -03:00
Matthieu Bouron
bf011695fd lavc/hevc: store VPS/SPS/PPS data 2016-09-09 16:35:37 +02:00
Michael Niedermayer
752e6dfa3e avcodec/ccaption_dec: Use simple array instead of AVBuffer
This is simpler and fixes an out of array read, fixing it with AVBuffers
would be more complex

Fixes: e00d9e6e50e5495cc93fea41147b97bb/asan_heap-oob_12dcdbb_8798_b32a97ea722dd37bb5066812cc674552.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-09 11:01:24 +02:00
Michael Niedermayer
037422178d avcodec/alsdec: Fix reading 0 mantisse bits
Fixes assertion failure
Fixes: 848c24abc1721c9e3d1ba7bfee8d9fcc/asan_heap-oob_1d99eca_3709_567bba70d67e7d62714dcf56f26fb1da.mp4

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-08 22:16:48 +02:00
Michael Niedermayer
2d3099ad8e avcodec/svq3: Reintroduce slice_type
Fixes out of array read
Fixes: 1642cd3962249d6aaf0eec2836023fb6/signal_sigsegv_2557a72_2995_04efaf2ff57a052f609a3b4a2ea4e622.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-08 22:16:35 +02:00
Michael Niedermayer
c0fc83ed41 avcodec/mlz: Check offset before writing
Fixes: 0cee183a09bff5aa5108429717c35a4d/asan_heap-oob_1d99eca_3702_9ef60e80de79082a778d3d9ce8ef3b64.mp4
Affects no release

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-08 20:31:15 +02:00
Michael Niedermayer
2f7a12fab5 avcodec/mlz: clear dict on allocation to ensure there are no uninitialized values
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-08 20:31:15 +02:00
Michael Niedermayer
f2192e0f03 avcodec/alsdec: Fix raw_mantissa memleak
Fixes: 0cee183a09bff5aa5108429717c35a4d/asan_heap-oob_1d99eca_3702_9ef60e80de79082a778d3d9ce8ef3b64.mp4

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-08 20:31:15 +02:00
Michael Niedermayer
837e72b016 avcodec/alsdec: Fix mlz memleak
Fixes: 0cee183a09bff5aa5108429717c35a4d/asan_heap-oob_1d99eca_3702_172c75af9868d4c2556a79cc2413f4cc.mp4

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-08 20:31:15 +02:00
Timo Rothenpieler
8ebe1dddfb avcodec/nvenc: use frame size instead of surface size 2016-09-08 19:08:31 +02:00
Matthieu Bouron
4b290078e4 lavc/mediacodecdec_h264: use h264_parse.h instead of h264dec.h
ff_h264_decode_extradata is referenced by h264_parse.h and not
h264dec.h.
2016-09-07 21:04:13 +02:00
Matthieu Bouron
256e99f6f0 lavc/mediacodecdec_h264: move bsf variable declaration at the top of the function 2016-09-07 21:04:13 +02:00
Sven C. Dack
4aeb7a88ec avcodec/nvenc: support RGB input
nvenc still encodes as yuv, but does the conversion internally which
brings some performance gains.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2016-09-07 18:44:10 +02:00
Timo Rothenpieler
fa3ecad071 avcodec/nvenc: correctly set inputPitch 2016-09-07 18:44:10 +02:00
Timo Rothenpieler
96cba1c552 avcodec/nvenc: use av_image_copy for copying frame data 2016-09-07 18:44:10 +02:00
Carl Eugen Hoyos
7a8e5ff1fd lavc/avcodec: Improve av_parser_parse() documentation, mention padding.
Fixes ticket #5809.
2016-09-07 18:37:01 +02:00
Paul B Mahol
7a258ef97e avcodec/gif: don't honor transparency if palette changed
It generally does not work.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-07 15:56:13 +02:00
Matthieu Bouron
f574012d5f lavc/mediacodecdec_h264: fix SODB escaping
Fixes escaping of consecutive 0x00, 0x00, 0x0{0-3} sequences.
2016-09-07 15:35:09 +02:00
Michael Niedermayer
a97e35e7c2 avcodec: Fix successfull typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-07 01:43:07 +02:00
Philip Langdale
86910b15c9 cuvid: Implement flush to support seeking in media players
Right now, if we attempt to use cuvid in a media player and then
try to seek, the decoder will happily pass out whatever frames were
already in flight before the seek.

There is both the output queue in our code and some number of frames
within the cuvid decoder that need to be accounted for.

cuvid doesn't support flush, so our only choice is to do a brute-force
re-creation of the decoder, which also implies re-creating the parser,
but this is fine.

The only subtlty is that there is sanity check code in decoder
initialisation that wants to make sure the HWContextFrame hasn't already
been initialised. This is a fair check to do at the beginning but not
after a flush, so it has to be made conditional.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2016-09-06 21:52:05 +02:00
Philip Langdale
1891dfe013 cuvid: Add hwaccels and decoders for remaining supported formats
cuvid/nvdecode also supports mpeg1, mpeg2, h.263/mpeg4-asp and mjpeg.

It should, in theory, also support wmv3 via the vc1 support, given
that vdpau supports this. However, it failed to play wmv3 samples
which vdpau played correctly, so I'm not sure what to make of it.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2016-09-06 21:35:42 +02:00
Carl Eugen Hoyos
f077ad69c6 lavc/avpacket: Fix undefined behaviour, do not pass a null pointer to memcpy().
Fixes ticket #5128.
2016-09-05 10:16:03 +02:00
Paul B Mahol
e7bc9623e5 avcodec/pnmdec: fix undefined behaviour
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-05 10:06:25 +02:00
Paul B Mahol
3c55baf08f avccodec/utvideoenc: support encoding ULY4 and ULH4
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-04 15:51:33 +02:00
Paul B Mahol
c62cb9bf5a avcodec/utvideodec: add support for ULY4 and ULH4
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-04 01:57:50 +02:00
James Almer
d2e74315e5 avcodec/utils: print only the padding values that are set
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-03 11:57:23 -03:00
James Almer
4fed4aca0c avcodec/utils: print initial and trailing paddings only in verbose levels
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-03 11:57:18 -03:00
Carl Eugen Hoyos
a6a453ccd1 Cosmetics: Reindent after e82b181f. 2016-09-03 14:23:32 +02:00
Carl Eugen Hoyos
e82b181f80 lavc/mjpegdec: Only read JFIF thumbnail size if the segment is long enough.
Fixes ticket #5805.
2016-09-03 14:21:46 +02:00
Carl Eugen Hoyos
cef5bc0e6e lavc/mjpegdec: Do not skip reading quantization tables.
They may contain 0xFFs, confusing the start code finding algorithm.

Fixes ticket #5819.
2016-09-03 13:25:54 +02:00
Michael Graczyk
be07c25896 libavcodec/opus: Add channel mapping 2 to extradata parser
This allows libavcodec/opus to demux ambisonics in an ogg/opus container.
Channel mapping family 2 is being added in this standards track IETF draft:
tools.ietf.org/html/draft-ietf-codec-ambisonics-00

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-01 23:53:24 +02:00
Michael Graczyk
5d054a1ac4 libavcodec/opus: Fix spelling in error message 2016-09-01 10:29:08 -08:00
Timo Rothenpieler
cac2df230e avcodec/nvenc: update license header 2016-08-28 19:51:22 +02:00
Timo Rothenpieler
26a5cbd781 avcodec/nvenc: use proper soname for cuda/nvenc libraries 2016-08-28 19:49:56 +02:00
Timo Rothenpieler
df615efcf2 avcodec/nvenc: check maximum driver API version 2016-08-28 19:46:44 +02:00
Timo Rothenpieler
a19989cae5 avcodec/nvenc: fix potantially uninitialized free 2016-08-28 18:58:05 +02:00