Commit Graph

82475 Commits

Author SHA1 Message Date
Andreas Cadhalpun
1e33035ee7 proresdec_lgpl: explicitly check coff[3] against slice_data_size
The implicit checks via v_data_size and a_data_size don't work in the case
'(hdr_size > 7) && !ctx->alpha_info'.

This fixes segmentation faults due to invalid reads.

This problem was introduced in commit
547c2f002a.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-10 21:00:44 +01:00
Sasi Inguva
18108f3618 lavc/utils.c: Make sure skip_samples never goes negative.
Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 17:44:47 +01:00
Sasi Inguva
c8dc11bb9e lavf/mov.c: Fallback to finding non-keyframe in fix_index, if keyframe search fails.
Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 17:44:47 +01:00
Tom Butterworth
bd6fa80d56 avcodec/hap: add "compressor" option to Hap encoder to disable secondary compression
The secondary compression in Hap is optional, this change exposes that option to
the user as some use-cases favour higher bitrate files to reduce workload
decoding.
Adds "none" or "snappy" as options for "compressor". Selecting "none" disregards
"chunks" option: chunking is only of benefit decompressing Snappy.

Reviewed-by: Martin Vignali <martin.vignali@gmail.com>
Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
2016-11-10 14:27:38 +00:00
Carl Eugen Hoyos
08be65a075 lavc/hevc_ps: Fix an error message. 2016-11-10 08:22:26 +01:00
Carl Eugen Hoyos
edb8af6e92 lavc/hevc_ps: Use correct pix_fmt for 12bit 4:0:0.
Fixes part of ticket #5544.
2016-11-10 08:11:12 +01:00
Steven Liu
863ebe6f83 avformat/flvenc: add add_keyframe_index option
Add keyframe index metadata
Used to facilitate seeking; particularly for HTTP pseudo streaming.
 1. read live streaming or file by sequence
 2. if use add_keyframe_index option, add a mark flag at the position,
    use to insert new context at the last step.
 3. add the keyframes *offset* and *timestamp* into a list
 4. if use add_keyframe_index option, shift the metadata data from
    mark flag offset
 5. insert the keyframes *offset* and *timestamp* from the list by
    sequence
 6. free the list
 7. end.

Add FATE test case;

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Steven Liu <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 10:30:48 +08:00
Michael Niedermayer
2bc66d9e43 nut: add gray12 support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 01:18:43 +01:00
Luca Barbato
19be5fb728 swscale: Add GRAY12
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:49:29 +01:00
Luca Barbato
638b216d4f pixfmt: Add GRAY12
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:42:48 +01:00
Michael Niedermayer
b828788d58 swscale: Add GBRAP10 output
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Luca Barbato
2c7d8cbd66 swscale: Add the GBRAP12 output
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Michael Niedermayer
873d06c76e swscale/output: Fix alpha shift in yuv2gbrp_full_X_c()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Michael Niedermayer
a340cfef82 swscale/input: Fix alpha bswap for set readAlpPlanar
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Michael Niedermayer
d736b52a04 swscale: Drop is9_OR_10BPS() use, its name is not correct
Found-by: Luca Barbato
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 00:33:12 +01:00
Andreas Cadhalpun
226d35c845 escape124: reject codebook size 0
It causes a cb_depth of 32, leading to assertion failures in get_bits.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-09 21:10:59 +01:00
Andreas Cadhalpun
d54c95a143 icodec: add ico_read_close to fix leaking ico->images
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-09 21:10:41 +01:00
Andreas Cadhalpun
467eece1be icodec: fix leaking pkt on error
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-09 21:10:35 +01:00
Steven Liu
ab6ffc2a08 MAINTAINERS: Add myself to flvenc
Signed-off-by: Steven Liu <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-09 17:49:19 +01:00
Andreas Cadhalpun
1bbb18fe82 mpegts: prevent division by zero
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-08 22:27:11 +01:00
Andreas Cadhalpun
ff100c9dd9 matroskadec: fix NULL pointer dereference in webm_dash_manifest_read_header
The code assumes that s->streams[0] is valid.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-08 20:17:31 +01:00
Tom Butterworth
0a24587588 avcodec/hap: pass texture-compression destination as argument, not in context
This allows a subsequent change to compress directly into the output packet when possible.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
2016-11-08 17:05:27 +00:00
James Almer
70c6a1bcf0 avformat/matroskadec: fix DiscardPadding element parsing
If the value is negative then it means padding at the start of the packet
instead of at the end.

Based on a patch by Hendrik Leppkes.

Reviewed-by: James Zern <jzern-at-google.com@ffmpeg.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-08 13:43:53 -03:00
Rostislav Pehlivanov
317be31eaf opus: move the entropy decoding functions to opus_rc.c
The intention is to have both encoding and decoding functions
in opus_rc.c.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-11-08 14:18:59 +00:00
Rostislav Pehlivanov
0660a09dd1 opus: move all tables to a separate file
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-11-08 14:18:59 +00:00
Vittorio Giovara
a765ba647d avformat/mov: Read multiple stsd from DV
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-08 14:07:41 +01:00
Reynaldo H. Verdejo Pinochet
6f0a1710d7 ffserver: use AVStream.codecpar in open_input_stream()
AVStream.codec is deprecated

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-08 12:12:19 +01:00
Reynaldo H. Verdejo Pinochet
822e3e2ddb ffserver: user AVStream.codecpar in compute_status()
AVStream.codec is deprecated

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-08 12:12:15 +01:00
Reynaldo H. Verdejo Pinochet
afcbadf0ed ffserver: use AVStream.codecpar in find_stream_in_feed()
AVStream.codec is deprecated

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-08 12:12:12 +01:00
Reynaldo H. Verdejo Pinochet
1323349bef ffserver: get time_base from AVStream in print_stream_params()
AVStream.codec is deprecated

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-08 12:12:09 +01:00
Reynaldo H. Verdejo Pinochet
689f648a95 ffserver: use .codecpar instead of .codec in print_stream_params()
AVStream.codec is deprecated

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-08 12:12:04 +01:00
Reynaldo H. Verdejo Pinochet
311107a65d ffserver: check for codec match using AVStream.codecpar
Compare using AVCodecParameters instead of the deprecated
AVStream.codec field

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-08 12:11:57 +01:00
Steven Liu
acd87dfc05 cmdutils: add show_demuxers and show_muxers
add -muxers and -demuxers parameters to list the dexmuers and muxers

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-08 01:56:31 +01:00
Rostislav Pehlivanov
0cf6853804 aacenc: quit when the audio queue reaches 0 rather than keeping track of empty frames
The libopus encoder does the same thing and its better than
keeping track of when the empty flush frames appear.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-11-08 00:50:51 +00:00
Michael Niedermayer
ef6a786401 ffserver: Fix one AVFormatContext misuse
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-07 20:41:44 +01:00
Andreas Cadhalpun
2c90316b46 hls: fix leaking avio_opts on hls_read_header error
Use the hls_close function to reduce code duplication.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 19:44:41 +01:00
Andreas Cadhalpun
a305e0e5c0 hls: move hls_close above hls_read_header
This is needed for the following commit.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 19:43:43 +01:00
Andreas Cadhalpun
5249706e9d mpegaudio_parser: don't return AVERROR_PATCHWELCOME
The API does not allow returning AVERROR codes.

It triggers an assert in av_parser_parse2.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 19:41:17 +01:00
Michael Niedermayer
73ce1d864c ffserver: steal SPACE_CHARS, remove one reason for internal.h that way
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-07 19:27:40 +01:00
Michael Niedermayer
ecb40dee32 ffserver: eliminate hardcoded literal and duplicated array size
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-07 19:27:40 +01:00
Michael Niedermayer
10019c13e0 ffserver: use av_freep() for a case that is not clearly at the end of a function
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-07 19:27:40 +01:00
Michael Niedermayer
f67d22f0fd ffserver: Throw ffm.h out its not used except for a constant that is part of the format
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-07 19:27:40 +01:00
Michael Niedermayer
4c8d69e534 ffserver: drop a bunch of apparently unneeded internal headers
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-07 19:27:40 +01:00
Anssi Hannula
e2193b53ea avformat/hls: Add missing error check for avcodec_parameters_copy()
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2016-11-07 18:56:36 +02:00
Anssi Hannula
3d2f636497 avformat/hls: Fix probing mpegts audio streams that use probing
Commit 04964ac311 ("avformat/hls: Fix missing streams in some
cases with MPEG TS") caused a regression where subdemuxer streams that
use probing (e.g. dts/eac3/mp2 in mpegts) no longer get probed properly.

This is because the codec parameters from the subdemuxer stream, once
probed, are not passed on to the main stream.

Fix that by updating the codec parameters if the codec id changes.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2016-11-07 18:56:36 +02:00
Anssi Hannula
9a51cd35b8 avformat/hls: Factor copying stream info to a separate function
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2016-11-07 18:56:36 +02:00
Andreas Cadhalpun
34aeb5dbc4 xmv: validate sample_rate
AVCodecParameters.sample_rate is a signed integer, so
XMVAudioPacket.sample_rate should be, too.

A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun
54b8fbbc5d voc_packet: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun
eb205eda3f oggparsespeex: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun
f748e3b5a2 nuv: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00