1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

74947 Commits

Author SHA1 Message Date
wm4
96b87d5cfa avformat/mp3dec: improve junk skipping heuristic
Commit 2b3e9bbfb529e6bde238aeb511b55ebe461664c8 caused problems for a
certain API user:

https://code.google.com/p/chromium/issues/detail?id=537725
https://code.google.com/p/chromium/issues/detail?id=542032

The problem seems rather arbitrary, because if there's junk, anything
can happen. In this case, the imperfect junk skipping just caused it to
read different junk, from what I can see.

We can improve the accuracy of junk detection by a lot by checking if 2
consecutive frames use the same configuration. While in theory it might
be completely fine for the 1st frame to have a different format than the
2nd frame, it's exceedingly unlikely, and I can't think of a legitimate
use-case.

This is approximately the same mpg123 does for junk skipping. The
set of compared header bits is the same as the libavcodec mp3 parser
uses for similar purposes.
(cherry picked from commit de1b1a7da9e6ddf42447271e519099a88b389e4a)
2015-10-20 12:35:43 +02:00
Marton Balint
e0e28dad90 concatdec: fix file_start_time calculation regression
Fixes ticket #4924.

Found-by: Jaroslav Šnajdr <jsnajdr@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit df239b76195156f179618ddb8b167d5bf1245247)
2015-10-17 22:36:33 +02:00
周晓勇
1a67b0f9ae avcodec: loongson optimize h264dsp idct and loop filter with mmi
Change-Id: Ic87fb8f5cd22a502ff9dbbc5a5a8ea97cfc8a1dd
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-16 14:47:56 +02:00
Michael Niedermayer
e3fcd88f08 avcodec/jpeg2000dec: Clear properties in jpeg2000_dec_cleanup() too
Fixes: Ticket4878

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c980c5e54dfe83ce8b631845ce750c38cec56873)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-16 14:47:56 +02:00
Anssi Hannula
68a6178ef0 avformat/hls: add support for EXT-X-MAP
Without EXT-X-MAP support we miss the first bytes of some streams.

These streams worked by luck before byte-ranged segment support was added in
da7759b3579de3e98deb1ac58e642b861280ba54

Fixes ticket #4797.
(cherry picked from commit 909907948846dedf57a730a4d115d04d1117f9e5)

Conflicts:
	libavformat/hls.c
2015-10-15 14:27:20 +02:00
Anssi Hannula
d51ddd45b2 avformat/hls: fix segment selection regression on track changes of live streams
Commit ad701326b43078b90 ("avformat/hls: open playlists immediately when
AVDISCARD_ALL is dropped") inadvertently caused first_packet to never be
cleared, causing select_cur_seq_no() to not use the specific code for
live streams.

In practice this means that when the user selects a different audio
track during live stream (i.e. non-VOD) playback, there may be some
additional delay as the code might select an incorrect segment at first,
and we have to wait for video to catch audio (if too late segment was
selected) or to download more following audio segments (if too early
segment was selected).

Fix that by restoring the zeroing of first_packet.
(cherry picked from commit fd74d45d5158812675105a3b4aeb29c67b82f7e8)
2015-10-15 14:21:29 +02:00
Carl Eugen Hoyos
c2db8ebc08 configure: Require libkvazaar < 0.7.
Fixes ticket #4925.

Reviewed-by: Arttu Ylä-Outinen
2015-10-14 14:15:30 +02:00
Michael Niedermayer
b46efcb293 avcodec/vp8: Do not use num_coeff_partitions in thread/buffer setup
The variable is not a constant and can lead to race conditions

Fixes: repro.webm (not reproducable with FFmpeg alone)

Found-by: Dale Curtis <dalecurtis@google.com>
Tested-by: Dale Curtis <dalecurtis@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dabea74d0e82ea80cd344f630497cafcb3ef872c)
2015-10-14 14:15:11 +02:00
Michael Niedermayer
40934e0e9b Update for 2.8.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
n2.8.1
2015-10-13 20:44:52 +02:00
Pedro Arthur
bb3b4ad460 swscale: fix ticket #4881
When scaling only a slice of a frame the output was written always
in the first lines leaving the rest of the frame black.
(cherry picked from commit 5bd62a1b3c3356b84818efca3fcaf52da27a32af)
2015-10-13 20:11:42 +02:00
Andreas Cadhalpun
13d3749424 doc: fix spelling errors
Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 8d6625642db064a45224cb7a8e037f6e79a6554d)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-12 21:46:54 +02:00
Andreas Cadhalpun
173053a125 hls: only seek if there is an offset
If there is no #EXT-X-BYTERANGE specified, there is no need to seek.
Seeking fails anyway for rtmp, because this protocol does not support
url_seek.

This fixes CNN.m3u from trac ticket 4797 (i.e. Debian bug #798189).

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit f9f0b4c08e7dc2c178ede137af4f64ca84ab2deb)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-12 21:46:54 +02:00
Alexandra Hájková
8118fdf8bb asfdec: add more checks for size left in asf packet buffer
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit c0a49077ea4ff3a0ad30b9e33f1bb06ba9112aaa)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-12 21:46:54 +02:00
Alexandra Hájková
f235f511a0 asfdec: alloc enough space for storing name in asf_read_metadata_obj
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 77cf23668991bfd1fb69339f13e1511b4186b7b3)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-12 21:46:54 +02:00
Michael Niedermayer
c149a4afee avcodec/pngdec: Check blend_op.
Fixes CID1322359, CID1322358

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1e7e4f13f95227d79bc8ab9a2167f02f7a3e063f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-12 02:23:36 +02:00
赵宇龙
02d8abf0f5 h264_mp4toannexb: fix pps offfset fault when there are more than one sps in avcc
the pps offset is used to locate pps in the spspps_buf; however, the
current calc method is wrong because it is the offset of the original
avctx->extradata;
when there is only one sps in the avcc; the value is correct by
coincidence, however, it will
fail in avcc with multi sps

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6b32d0d86b6bec2b5cb565d6ab4556f8cd66214a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-12 02:23:36 +02:00
Michael Niedermayer
9579550b2b avcodec/h264_mp4toannexb_bsf: Use av_freep() to free spspps_buf
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3d126ef188639e0b55bdbbb755eafced66f23352)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-12 02:23:36 +02:00
Michael Niedermayer
7ec05ae969 avformat/avidec: Workaround broken initial frame
Fixes Ticket4851

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e2ef00394b8079e93835d47c993868229f07502)
2015-10-09 21:15:15 +02:00
wm4
b9841ba98c avformat/hls: fix some cases of HLS streams which require cookies
Broken by commit ba12ba859aabfa7153ba397d869db13acdaba340. This only
happens with HLS streams which use encryption and require preserving
cookies sent by the server.

Fixes trac issue #4846.
(cherry picked from commit 26eb2940079d0ec433cf9b2deae24560707cbcf8)
2015-10-09 21:14:23 +02:00
Paul B Mahol
39df4d2475 avcodec/pngdec: reset has_trns after every decode_frame_png()
Fixes #4887.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 1d0487f77f07663c510207eb6e946675b71823cb)
2015-10-09 21:14:02 +02:00
Przemysław Sobala
635831c087 lavf/img2dec: Fix memory leak
Fixes #4886

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 01dd7e025c246d9001f1a30f4a5d8fa2936d1a5e)
2015-10-09 21:13:49 +02:00
wm4
291a2f1ea7 avcodec/mp3: fix skipping zeros
Commits 43bc5cf9 and c5371f77 add code for skipping initial zeros in mp3
packets. This code forgot to report to the user that data was skipped at
all.

Since audio codecs allow partial packet decoding, the user application
has to rely on the return value. It will remove the data reported as
consumed by the decoder, and feed it to the decoder again. This resulted
in the mp3 frame after the zero region to be decoded over and over
again, until the zero region was finally skipped by the application.

Fix this by including the amount of skipped bytes to the number of
consumed bytes returned by the decode call.

Fixes trac ticket #4890.
(cherry picked from commit cb1da9fb8d71bb611a7b0028914c97afc3f5711d)
2015-10-09 21:12:30 +02:00
Clément Bœsch
ee1bcd3436 avformat/srtdec: make sure we probe a number
Fixes regression since 7218352e0228028dfa009a3799ec93fd041065f1: WebVTT
files were matching the SRT probing.

(cherry picked from commit 40d9d6de90c3652f4c468ab14976c7faf5e40c07)
2015-10-09 10:56:31 +02:00
James Almer
408240267a configure: check for ID3D11VideoContext
Should fix compilation with mingw-w64 trunk, where ID3D11VideoDecoder is available
but ID3D11VideoContext still isn't.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit b8e4df46ab5a6b8333dbcd872e4f161fc9bba83a)
2015-10-08 17:08:04 -03:00
wm4
eca7b0dcce avformat/vobsub: compare correct packet stream IDs
The stream ID is essentially an arbitrary number defined by the .idx
file headers. They have to match the IDs in the .sub stream. The vobsub
demuxer assumed the IDs would just start from 0, increassing by 1 for
each stream. This is not correct. In the sample I had, the IDs were
starting from 1, leading to no subtitles being displayed at all.

Fix this by using the correct stream ID.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a47ad06baf6c0db6d47a5531d6d4ee0511f44eac)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 15:21:45 +02:00
Clément Bœsch
64b659673a avformat/srtdec: more lenient first line probing
Fixes Ticket #4898
(cherry picked from commit 7218352e0228028dfa009a3799ec93fd041065f1)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 15:21:39 +02:00
Clément Bœsch
1d9d300d65 avformat/srtdec: fix number check for the first character
(cherry picked from commit d161a2a72b083c51ec8fad33a29283703f5fd0cc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 15:21:24 +02:00
Shivraj Patil
a931ad554d avcodec/mips: build fix for MSA 64bit
Modified datatype of function argument (pitch from int32_t to ptrdiff_t).

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Commit in master: 322e960dbf32b846b26f95afa6c0e652bc04e90d
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 14:32:05 +02:00
Shivraj Patil
7236080d27 avcodec/mips: build fix for MSA
Modified sps and pps access from old HEVCContext(s) structure to newly introduced HEVCParamSets(ps).

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Commit in master: b0732b0214a40cdbcaf49d72cc6f25a7e9e5f115
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 14:31:49 +02:00
Andrey Utkin
6dcd2ebd34 avformat/httpauth: Add space after commas in HTTP/RTSP auth header
This fixes access to Grandstream cameras, which return 401 to ffmpeg
otherwise.
VLC sends Authorization: header with spaces between parameters, and it
is known to work with Grandstream devices and broad range of other HTTP
and RTSP servers, so author considers switching to such behaviour safe.
Just for record - RFC 2617 (HTTP Auth) does not specify the need in
spaces, so this is not a bug of FFmpeg.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fdb32838723effb4560a345013387ea37b85ff20)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
DHE
83d75c70df libavformat/hlsenc: Use of uninitialized memory unlinking old files
Fixes ticket#4900

Signed-off-by: DHE <git@dehacked.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 76e3f8242d607ac0394b7894196f83f8d02ce5ca)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
818ebcbf5c avcodec/x86/sbrdsp: Fix using uninitialized upper 32bit of noise
Fixes crash
Fixes: flicker-1.scout3d21443372922.28.m4a

Found-by: Dale Curtis <dalecurtis@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1b82b934a166e60f64e966eaa97512ba9dcb615b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
837113ab5f avcodec/ffv1dec: Fix off by 1 error in quant_table_count check
Fixes: invalid_read.nut
Found-by: Paul B Mahol <onemda@gmail.com>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2d221d9e069e6269cb41f3678f2734800171d87b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
97340bdfa3 avcodec/ffv1dec: Explicitly check read_quant_table() return value
Forwards the error code, avoids potential integer overflow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 10bbf6cf622f8a954c6cc694ca07c24f989c99af)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Jeremy James
61fd5a3072 dnxhddata: correct weight tables
CID 1260 (as evidenced by incorrect decoding of a sample from ticket
4876) seems to use incorrect weight tables. It appears those tables
were not zigzag-scanned.

Apply zigzag on weight tables for new CIDs 1258, 1259, and 1260, and
fix an incorrect chroma table for CID 1256.

Fixes last issue from ticket #4876.

Found-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 428424fe75206753ab2039e624031c9643623ea0)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Christophe Gisquet
f5f9c166a1 dnxhddec: decode and use interlace mb flag
This bit is 1 in some samples, and seems to coincide with interlaced
mbs and CID1260. 2008 specs do not know about it, and maintain qscale
is 11 bits. This looks oversized, but may help larger bitdepths.

Currently, it leads to an obviously incorrect qscale value, meaning
its syntax is shifted by 1. However, reading 11 bits also leads to
obviously incorrect decoding: qscale seems to be 10 bits.

However, as most profiles still have 11bits qscale, the feature is
restricted to the CID1260 profile.

The encoder writes 12 bits of syntax, last and first bits always 0,
which is now somewhat inconsistent with the decoder, but ends up with
the same effect (progressive + reserved bit).

Partially fixes ticket #4876.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2801a1352dc8682b028e53880f9847fcb2116947)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Pedro Arthur
01bf0a178d swscale: fix ticket #4877
(cherry picked from commit a8602dde5e0a9858b9cee7e3788bef8efc43d950)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
3cd1be9702 avcodec/rangecoder: Check e
Fixes hang.nut

Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b2955b6c5aed11026ec5c7164462899a10cdb937)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
d4b1fe72c2 avcodec/ffv1: seperate slice_count from max_slice_count
Fix segfault with too large slice_count
Fixes Ticket4879

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit aa6c43f3fdec8a7518534b9dab20c9eb4be11568)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Pedro Arthur
a8d0dcbafa swscale: fix ticket 4850
(cherry picked from commit 77367f61b38dbdf17c31aa6a6b3edccb2ebf5354)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
2a6103a082 cmdutils: Filter dst/srcw/h
Dimensions / pixel formats for scaling must be set through the -s / pix_fmt options
or the scale / format filters. Otherwise there are mismatches between whet is
in/output to the scaler and for what the scaler is configured

Fixes Ticket4856

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a0af9fd95415293b965bb67e56a11f6429326db1)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Ganesh Ajjanagadde
3fedd64d4b avutil/log: fix zero length gnu_printf format string warning
This should fix warning reported by fate client:
http://fate.ffmpeg.org/report.cgi?time=20150917113121&slot=x86_32-linux-gnu-gcc-4.5.1-have_6regs.
Untested.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 63cdb6e4a59e296e27a78ac08f15500b42cd27fc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Simon Thelen
9bbcd1cc7b lavf/webvttenc: Require webvtt file to contain exactly one WebVTT stream.
Not requiring this can end up producing hilariously broken files
together with -c:s copy (e.g. a webvtt file containing binary subtitle data).

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b84232694ef0c6897e82b52326c9ea4027c69ec4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
9801c9524a swscale/swscale: Fix "unused variable" warning
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0ae40c5a70490f102f7b1c62018746d3b424fa07)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
08fc0d771a avcodec/mjpegdec: Fix decoding RGBA RCT LJPEG
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 055e56e9f76da3298f1b59bf5ea46f570e844600)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
a3db85581e MAINTAINERS: add 2.8, drop 2.2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
James Almer
ddbb8d5eda doc: mention libavcodec can decode Opus natively
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit fd9ac48dc8aebcbd601af34336234d5102b36e21)
2015-09-20 23:30:50 -03:00
Hendrik Leppkes
41aa6b2095 hevc: properly handle no_rasl_output_flag when removing pictures from the DPB
Fixes ticket #4185.

Reviewed-By: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-20 00:18:57 +02:00
Paul B Mahol
fb0d41932d avfilter/af_ladspa: process all channels for nb_handles > 1
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit dc1050a3e8557fc423023036f698cc476fb675b4)
2015-09-16 12:50:13 +00:00
Ricardo Constantino
aa46ae8848 configure: add libsoxr to swresample's pkgconfig
Fixes linking in FFMS and f265 at least, when ffmpeg is compiled with
libsoxr.

Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2641eeeefe93767e812d0acb9e3cb9bf157e6e95)
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2015-09-09 07:41:33 -07:00