ffmpeg.git
5 years agoffmpeg_filter: Fix non jpeg yuv in jpeg support
Michael Niedermayer [Wed, 2 Oct 2013 12:16:12 +0000 (14:16 +0200)]
ffmpeg_filter: Fix non jpeg yuv in jpeg support

This is a regression, did not bisect so dont know what caused it but
likely some changes to the command line handling code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d9bc251d3978cf0b9722991f7c23edebca7abb18)

5 years agoavformat/utils: do not override pts in h264 when they are provided from the demuxer
Michael Niedermayer [Sat, 26 Oct 2013 23:03:19 +0000 (01:03 +0200)]
avformat/utils: do not override pts in h264 when they are provided from the demuxer

Fixes Ticket2143

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1e5271a9fd6ddcceb083f2185a4bbd8d44c9a813)

5 years agoh264: make flush_change() set mmco_reset
Michael Niedermayer [Fri, 25 Oct 2013 23:22:38 +0000 (01:22 +0200)]
h264: make flush_change() set mmco_reset

This ensures that frames do not get mixed on context reinits

Fixes Ticket2836

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3c9dd93faa9f3c250428dd0548c075583aa07cc3)

5 years agoavcodec/h264: reduce noisiness of "mmco: unref short failure"
Michael Niedermayer [Fri, 25 Oct 2013 18:03:29 +0000 (20:03 +0200)]
avcodec/h264: reduce noisiness of "mmco: unref short failure"

Do not consider it an error if we have no frames and should discard one.
This condition can easily happen when decoding is started from an I frame

Fixes Ticket2811

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 08a89761964bdd0a023eff6d37a1131fb7e1d7a0)

5 years agoavformat/mp3dec: perform seek resync in the correct direction
Michael Niedermayer [Fri, 25 Oct 2013 17:35:55 +0000 (19:35 +0200)]
avformat/mp3dec: perform seek resync in the correct direction

Fixes seeking to the last frame in CBR files
Fixes Ticket2773

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ba8716df7fb541fb690d1a898cda0e12f9011faf)

5 years agoavformat/wavdec: Fix smv packet interleaving
Michael Niedermayer [Fri, 25 Oct 2013 10:50:26 +0000 (12:50 +0200)]
avformat/wavdec: Fix smv packet interleaving

This strips the relative timestamp "flag" off.

Fixes Ticket2849

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6abb9eb525239f954ec12e52fc209e6dfce2a6d4)

5 years agoavcodec/h264: do not trust last_pic_droppable when marking pictures as done
Michael Niedermayer [Thu, 24 Oct 2013 21:11:41 +0000 (23:11 +0200)]
avcodec/h264: do not trust last_pic_droppable when marking pictures as done

This simplifies the code and fixes a deadlock

Fixes Ticket2927
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 29ffeef5e73b8f41ff3a3f2242d356759c66f91f)

5 years agodoc/Makefile: fix man pages uninstall path
Stefano Sabatini [Thu, 24 Oct 2013 19:14:55 +0000 (21:14 +0200)]
doc/Makefile: fix man pages uninstall path

Fix trac ticket #3054.
(cherry picked from commit af1c5388501e80e6d92704bb70610998226e5e51)

5 years agoavformat/mov: force parsing of headers if stts is absent
Michael Niedermayer [Fri, 4 Oct 2013 15:39:19 +0000 (17:39 +0200)]
avformat/mov: force parsing of headers if stts is absent

Fixes Ticket2991

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e41ea866fc26f38d770bbc1ad67703e7f4400ae1)

5 years agoavformat/gifdec: make GIF_APP_EXT_LABEL parsing more robust
Michael Niedermayer [Fri, 4 Oct 2013 20:56:02 +0000 (22:56 +0200)]
avformat/gifdec: make GIF_APP_EXT_LABEL parsing more robust

Fixes Ticket3021

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e1f8184a1a973fd7de1bf53578d09661ec7bad75)

5 years agoavformat/matroskadec: only set r_frame_rate if the value is within reasonable limits
Michael Niedermayer [Sat, 5 Oct 2013 22:07:28 +0000 (00:07 +0200)]
avformat/matroskadec: only set r_frame_rate if the value is within reasonable limits

Fixes Ticket2451

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6853e40106cac769f0641183ea0bdd530ae9a0a1)

5 years agoavformat/wavdec: Dont trust the fact chunk for PCM
Michael Niedermayer [Wed, 9 Oct 2013 19:43:06 +0000 (21:43 +0200)]
avformat/wavdec: Dont trust the fact chunk for PCM

Fixes Ticket3033

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 83fc6c822b06688e572333299927d93eb3c6c426)

5 years agoavcodec/h264_refs: modify key frame detection heuristic to detect more cases
Michael Niedermayer [Wed, 9 Oct 2013 21:52:54 +0000 (23:52 +0200)]
avcodec/h264_refs: modify key frame detection heuristic to detect more cases

Fixes Ticket2968

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5ac6b6028f17b64723884c9fa72cfcbd369a1ba2)

5 years agolavd/v4l2: do not fail when VIDIOC_ENUMSTD returns EINVAL without a valid match
mrlika [Mon, 2 Sep 2013 12:10:22 +0000 (15:10 +0300)]
lavd/v4l2: do not fail when VIDIOC_ENUMSTD returns EINVAL without a valid match

With some (buggy) drivers, the VIDIOC_G_STD ioctl returns a std_id that cannot
be matched with any of the enumerated v4l2_standard structures (for example
std_id = 0 or std_id = 0xffffff). Do not fail when we reach the end of the
enumeration without a valid match.

Fixes ticket #2370

Note: This commit message has been modified by Giorgio Vazzana, the original
commit message was:

"Fixed regression for mandatory VIDIOC_ENUMSTD support by v4l2"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ed72542539fb61dc3a6d6280d8a6a956ac04a071)

6 years agodoc/codecs: fix dangling reference to codec-options chapter n2.0.2
Stefano Sabatini [Sat, 27 Jul 2013 14:50:19 +0000 (16:50 +0200)]
doc/codecs: fix dangling reference to codec-options chapter
(cherry picked from commit b4bd21b7fe2ad8be59b16538448586814e5db65b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoupdate for 2.0.2
Michael Niedermayer [Tue, 8 Oct 2013 17:39:58 +0000 (19:39 +0200)]
update for 2.0.2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/ffv1dec: fix format detection
Paul B Mahol [Mon, 9 Sep 2013 10:44:27 +0000 (10:44 +0000)]
avcodec/ffv1dec: fix format detection

Fixes crash with carefuly designed files.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit a27227d401adf12534dc7a26d72e43e2f35f8944)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/parser: reset indexes on realloc failure
Michael Niedermayer [Thu, 26 Sep 2013 19:03:48 +0000 (21:03 +0200)]
avcodec/parser: reset indexes on realloc failure

Fixes Ticket2982

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f31011e9abfb2ae75bb32bc44e2c34194c8dc40a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/imgconvert/get_color_type: fix type for PAL8
Michael Niedermayer [Wed, 2 Oct 2013 16:11:28 +0000 (18:11 +0200)]
avcodec/imgconvert/get_color_type: fix type for PAL8

Fixes Ticket3008

Fate changes as PAL8 gets used instead of BGR8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 95666b22989b9b9f91a27da01b2bdbf4ee8022d3)

6 years agoconfigure: fix logic for threads in case of OpenCL is enabled.
Thilo Borgmann [Tue, 1 Oct 2013 14:49:39 +0000 (16:49 +0200)]
configure: fix logic for threads in case of OpenCL is enabled.

Fixes ticket 3004.

Signed-off-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d3a03d90a3d57cdc6f915a05f5f28ee4bb470d00)

6 years agoMerge remote-tracking branch 'TimothyGu/release/2.0' into release/2.0
Michael Niedermayer [Mon, 23 Sep 2013 20:31:41 +0000 (22:31 +0200)]
Merge remote-tracking branch 'TimothyGu/release/2.0' into release/2.0

* TimothyGu/release/2.0:
  doc/encoders: add doc for AAC encoder
  doc/formats: Add documentation for 3 parameters that have been missing
  doc/encoders: improve libvo-aacenc doc
  doc/encoders: reformat and add some clarification in libtwolame doc
  doc/encoders: reformat libmp3lame doc
  doc/encoders: add libxvid doc
  doc/encoders: partially rewrite and reformat libx264 docs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge remote-tracking branch 'jamrial/release/2.0' into release/2.0
Michael Niedermayer [Mon, 23 Sep 2013 20:30:42 +0000 (22:30 +0200)]
Merge remote-tracking branch 'jamrial/release/2.0' into release/2.0

* jamrial/release/2.0:
  avformat/matroskadec: check out_samplerate before using it in av_rescale()
  matroskadec: Improve TTA duration calculation
  avformat/oggparsevorbis: fix leak of tt
  avformat/oggparsevorbis: fix leak of ct

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/g2meet: Fix framebuf size
Michael Niedermayer [Sat, 21 Sep 2013 21:34:11 +0000 (23:34 +0200)]
avcodec/g2meet: Fix framebuf size

Currently the code can in some cases draw tiles that hang outside the
allocated buffer. This patch increases the buffer size to avoid out
of array accesses. An alternative would be to fail if such tiles are
encountered.
I do not know if any valid files use such hanging tiles.

Fixes Ticket2971
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e07ac727c1cc9eed39e7f9117c97006f719864bd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/g2meet: Fix order of align and pixel size multiplication.
Michael Niedermayer [Sun, 15 Sep 2013 14:33:27 +0000 (16:33 +0200)]
avcodec/g2meet: Fix order of align and pixel size multiplication.

Fixes out of array accesses
Fixes Ticket2922

Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 821a5938d100458f4d09d634041b05c860554ce0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/ffv1enc: update buffer check for 16bps
Michael Niedermayer [Mon, 9 Sep 2013 15:58:18 +0000 (17:58 +0200)]
avcodec/ffv1enc: update buffer check for 16bps

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3728603f1854b5c79d1a64dd3b41b80640ef1e7f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/truemotion2: Fix av_freep arguments
Michael Niedermayer [Sun, 8 Sep 2013 18:27:54 +0000 (20:27 +0200)]
avcodec/truemotion2: Fix av_freep arguments

Fixes null pointer dereference
Fixes Ticket2944

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c54aa2fb0f869ec025933944cbd1634fffe95d09)

Conflicts:

libavcodec/truemotion2.c

6 years agoavcodec/mjpegdec: Add some sanity checks to ljpeg_decode_rgb_scan()
Michael Niedermayer [Wed, 4 Sep 2013 22:36:44 +0000 (00:36 +0200)]
avcodec/mjpegdec: Add some sanity checks to ljpeg_decode_rgb_scan()

These prevent the rgb ljpeg code from being run on parameters that it doesnt
support. No testcase available but it seems possible to trigger these.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 61c68000eda643dfce96dc46b488d39fd5c4e309)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavfilter/vf_fps: make sure the fifo is not empty before using it
Michael Niedermayer [Mon, 2 Sep 2013 02:32:23 +0000 (04:32 +0200)]
avfilter/vf_fps: make sure the fifo is not empty before using it

Fixes Ticket2905

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cdd5df8189ff1537f7abe8defe971f80602cc2d2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/dsputil: fix signedness in sizeof() comparissions
Michael Niedermayer [Fri, 30 Aug 2013 21:40:47 +0000 (23:40 +0200)]
avcodec/dsputil: fix signedness in sizeof() comparissions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 454a11a1c9c686c78aa97954306fb63453299760)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoffv1dec: Check bits_per_raw_sample and colorspace for equality in ver 0/1 headers
Michael Niedermayer [Fri, 30 Aug 2013 04:08:32 +0000 (06:08 +0200)]
ffv1dec: Check bits_per_raw_sample and colorspace for equality in ver 0/1 headers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b05cd1ea7e45a836f7f6071a716c38bb30326e0f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/ffv1dec: check global header version
Michael Niedermayer [Fri, 30 Aug 2013 01:43:49 +0000 (03:43 +0200)]
avcodec/ffv1dec: check global header version

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 20b965a1a43ae88b7ae95635d5a3570e7dc2bbd4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agodoc/encoders: add doc for AAC encoder
Timothy Gu [Sun, 8 Sep 2013 23:32:22 +0000 (16:32 -0700)]
doc/encoders: add doc for AAC encoder

Thanks-to: Kostya Shishkov <kostya.shishkov@gmail.com>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 0e11790cf7eef3b0f38a64486da1e3fb8c7f14b8)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
6 years agodoc/formats: Add documentation for 3 parameters that have been missing
Timothy Gu [Mon, 16 Sep 2013 02:08:58 +0000 (19:08 -0700)]
doc/formats: Add documentation for 3 parameters that have been missing

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b7dd4598630fb1f890ae060f21a9ec92a103f22d)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
6 years agodoc/encoders: improve libvo-aacenc doc
Timothy Gu [Sun, 8 Sep 2013 03:13:11 +0000 (20:13 -0700)]
doc/encoders: improve libvo-aacenc doc

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 81bbe49a0e588aa899f37a567808ba8926d798d6)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
6 years agodoc/encoders: reformat and add some clarification in libtwolame doc
Timothy Gu [Sat, 3 Aug 2013 23:55:40 +0000 (16:55 -0700)]
doc/encoders: reformat and add some clarification in libtwolame doc

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit e45e72f5f89ef5a5791562cfcb935028b46ecd0a)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
6 years agodoc/encoders: reformat libmp3lame doc
Timothy Gu [Sat, 3 Aug 2013 23:51:26 +0000 (16:51 -0700)]
doc/encoders: reformat libmp3lame doc

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 40b8350b57adaa9aaf6731bac5130d4fec1639c3)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
6 years agodoc/encoders: add libxvid doc
Timothy Gu [Tue, 30 Jul 2013 02:12:10 +0000 (19:12 -0700)]
doc/encoders: add libxvid doc

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 6b255e5e70c72aa59ff7aed74b4ee976223eb140)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
6 years agodoc/encoders: partially rewrite and reformat libx264 docs
Timothy Gu [Mon, 22 Jul 2013 23:44:11 +0000 (16:44 -0700)]
doc/encoders: partially rewrite and reformat libx264 docs

Format is based on the thread:
"[PATCH] doc/encoders: Add libopus encoder doc" (06-28-2013)
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/165368/

Also merge the two option sections (Mapping and Private options).

Patch partially edited by Stefano Sabatini.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 11cb697501edf6447a718d6194f0e63ec2310d39)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
6 years agoavformat/matroskadec: check out_samplerate before using it in av_rescale()
Michael Niedermayer [Sun, 18 Aug 2013 00:20:54 +0000 (02:20 +0200)]
avformat/matroskadec: check out_samplerate before using it in av_rescale()

Prevent assertion failure with damaged input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 338f8b2eaf36f078eb5cc26ac10e651dc4c48243)

6 years agomatroskadec: Improve TTA duration calculation
James Almer [Sat, 17 Aug 2013 17:48:33 +0000 (14:48 -0300)]
matroskadec: Improve TTA duration calculation

Calculate the duration as accurately as possible to improve decoding of samples
where the last frame is smaller than the rest.

Signed-off-by: James Almer <jamrial@gmail.com>
Approved-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit af248fa1174200acb537a6ab1198bb2fed38e884)

6 years agoavformat/oggparsevorbis: fix leak of tt
Michael Niedermayer [Wed, 7 Aug 2013 15:20:39 +0000 (17:20 +0200)]
avformat/oggparsevorbis: fix leak of tt

Fixes CID1061059
Fixes fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f3b7f470701224086d06012f1d9a31864abe9300)

6 years agoavformat/oggparsevorbis: fix leak of ct
Michael Niedermayer [Wed, 7 Aug 2013 15:18:19 +0000 (17:18 +0200)]
avformat/oggparsevorbis: fix leak of ct

Fixes CID1061058
Fixes fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d0a882ab1d2a4197da1edd77450af30e2da3460e)

6 years agoavcodec/assenc: fix potential overread.
Clément Bœsch [Sun, 8 Sep 2013 16:23:44 +0000 (18:23 +0200)]
avcodec/assenc: fix potential overread.

(cherry picked from commit 860a0810583f54ccbde912aebda8711f18eab8eb)

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
6 years agoavcodec/srtdec: fix potential overread.
Clément Bœsch [Sun, 8 Sep 2013 16:28:11 +0000 (18:28 +0200)]
avcodec/srtdec: fix potential overread.

(cherry picked from commit 3a54c221d574ec944db1eddf9df895808f32bf9e)

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
6 years agoavformat/subtitles: add a next line jumper and use it.
Clément Bœsch [Sun, 8 Sep 2013 16:02:45 +0000 (18:02 +0200)]
avformat/subtitles: add a next line jumper and use it.

This fixes a bunch of possible overread in avformat with the idiom p +=
strcspn(p, "\n") + 1 (strcspn() can focus on the trailing '\0' if no
'\n' is found, so the +1 leads to an overread).

Note on lavf/matroskaenc: no extra subtitles.o Makefile dependency is
added because only the header is required for ff_subtitles_next_line().

Note on lavf/mpsubdec: code gets slightly complex to avoid an infinite
loop in the probing since there is no more forced increment.

NOTE:
Code of function ff_subtitles_next_line fixed by Alexander Strasser.

The original code from master did test the wrong character, but was
corrected by a subsequent commit. That commit however is not backported,
so it had to be fixed in this commit for the backport.

Conflicts:
libavformat/mpl2dec.c

(cherry picked from commit 90fc00a623de44e137fe1601b91356e8cd8bdd54)

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
6 years agoavformat/srtdec: skip initial random line breaks.
Clément Bœsch [Sun, 8 Sep 2013 14:17:46 +0000 (16:17 +0200)]
avformat/srtdec: skip initial random line breaks.

I found a bunch of (recent) SRT files in the wild with 3 to 10 line
breaks at the beginning.

(cherry picked from commit cfcd55db164e0acc0c30b2cf084e6eebe9741d34)

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
6 years agoUse rc_max_rate if no video bit_rate was specified when muxing mxf_d10.
Carl Eugen Hoyos [Mon, 9 Sep 2013 08:03:14 +0000 (10:03 +0200)]
Use rc_max_rate if no video bit_rate was specified when muxing mxf_d10.

Fixes ticket #2945.

Reviewed-by: Matthieu Bouron
(cherry picked from commit d73565d5ddf41d4b7805327cdb271c59d8c3fc59)

6 years agoStore the video bit_rate in the context when muxing mxf.
Carl Eugen Hoyos [Mon, 9 Sep 2013 08:02:12 +0000 (10:02 +0200)]
Store the video bit_rate in the context when muxing mxf.

This will allow using rc_max_rate if no bit_rate is specified (on remuxing).

Reviewed-by: Matthieu Bouron
(cherry picked from commit 52cf08b4c8859f7cac010a7a59f7aa369384ad85)

6 years agoavformat/subtitles: check lower bound for duration overlap seeking.
Clément Bœsch [Sun, 8 Sep 2013 07:55:02 +0000 (09:55 +0200)]
avformat/subtitles: check lower bound for duration overlap seeking.

(cherry picked from commit 1ca4bf930bab681a79fb591330043675c7cfd798)

6 years agoavformat/vobsub: fix seeking.
Clément Bœsch [Sun, 8 Sep 2013 07:43:53 +0000 (09:43 +0200)]
avformat/vobsub: fix seeking.

(cherry picked from commit f8678dcef3c5b0ea82e898e1f419863409fa135f)

6 years agoavformat/matroskaenc: remove bogus prores tag
Paul B Mahol [Sun, 8 Sep 2013 12:35:31 +0000 (12:35 +0000)]
avformat/matroskaenc: remove bogus prores tag

Fixes: ffmpeg -i input -c:v prores output.mkv

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 14851ca5f5a3af140085e82589e28e06c7cdefdc)

Conflicts:
libavformat/matroskaenc.c

6 years agoRead h264 headers from v4l2 to allow stream-copying.
Carl Eugen Hoyos [Sun, 1 Sep 2013 18:20:47 +0000 (20:20 +0200)]
Read h264 headers from v4l2 to allow stream-copying.

Fixes ticket #2882.
Analyzed and tested by William C Bonner.
(cherry picked from commit e337c9d56408dc00a15887309488a1ff5cb06ba3)

6 years agow64dec: fix end position of summarylist guid
Paul B Mahol [Tue, 3 Sep 2013 01:03:10 +0000 (01:03 +0000)]
w64dec: fix end position of summarylist guid

Noticed-by: James Almer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 3e36dc8626f4721ea749286dae40169ee5cb7d04)

6 years agow64dec: fix skipping of unknown guids
Paul B Mahol [Mon, 2 Sep 2013 22:50:00 +0000 (22:50 +0000)]
w64dec: fix skipping of unknown guids

Regression since 14d50c1.
Fixes #2932.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 79b70e47a463057a3a48353ee1dd58671c11f86c)

6 years agoAvoid a deadlock when decoding wma.
Carl Eugen Hoyos [Mon, 2 Sep 2013 06:32:24 +0000 (08:32 +0200)]
Avoid a deadlock when decoding wma.

Fixes ticket #2925.
(cherry picked from commit ec8a4841f7e81040f9a2757f23e70dff5e6b33a4)

6 years agoavcodec/ffv1dec: reorganize thread init/update
Carl Eugen Hoyos [Mon, 2 Sep 2013 06:49:59 +0000 (08:49 +0200)]
avcodec/ffv1dec: reorganize thread init/update

This moves some allocations to init, reducing possible failure modes in update.
Always copies from the previous context instead of just during init

Fixes Ticket2923

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 21dc3a3cc23c624630a4379f08a6efe0230de37a)

6 years agoavcodec/ffv1dec: move initial_states init to init_thread_copy()
Michael Niedermayer [Sun, 1 Sep 2013 17:29:38 +0000 (19:29 +0200)]
avcodec/ffv1dec: move initial_states init to init_thread_copy()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c72cca5a44d8a83e097a97a13990d421ba7a4c5d)

6 years agoavformat/lxfdec: use a parser to parse video frame headers
Michael Niedermayer [Sat, 31 Aug 2013 22:21:37 +0000 (00:21 +0200)]
avformat/lxfdec: use a parser to parse video frame headers

lxf needs a parser (or would need to set a few fields explicitly).
Fixes Ticket2917

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8349be852be7f68fe0590584fd46c4d5f1c16b3d)

6 years agoavcodec/h264: set er.ref_count earlier
Michael Niedermayer [Sun, 1 Sep 2013 01:40:20 +0000 (03:40 +0200)]
avcodec/h264: set er.ref_count earlier

Fixes Ticket2910

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 93cf7b01950b9d8e1646227752b522d0275d32df)

6 years agoavformat/avidec: match first index and first packet size=0 handling
Michael Niedermayer [Sat, 31 Aug 2013 01:08:25 +0000 (03:08 +0200)]
avformat/avidec: match first index and first packet size=0 handling

Fixes Ticket2861

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 227a0eb5a92409572f2cecde6137529b83e7d495)

Conflicts:
libavformat/avidec.c

6 years agoavcodec/pngdsp: fix (un)signed type in end comparission
Michael Niedermayer [Fri, 30 Aug 2013 21:14:32 +0000 (23:14 +0200)]
avcodec/pngdsp: fix (un)signed type in end comparission

Fixes out of array accesses
Fixes Ticket2919

Found_by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 86736f59d6a527d8bc807d09b93f971c0fe0bb07)

6 years agoffv1dec: check that global parameters dont change in version 0/1
Michael Niedermayer [Fri, 30 Aug 2013 02:51:09 +0000 (04:51 +0200)]
ffv1dec: check that global parameters dont change in version 0/1

Such changes are not allowed nor supported

Fixes Ticket2906

Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 547d690d676064069d44703a1917e0dab7e33445)

6 years agolavf/ftp: fix possible crash
Lukasz Marek [Wed, 28 Aug 2013 23:54:04 +0000 (01:54 +0200)]
lavf/ftp: fix possible crash
(cherry picked from commit f3ace37a3b8c93218630a37b7df4dc195f1215a9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agojpeg2000: fix dereferencing invalid pointers
Michael Niedermayer [Fri, 23 Aug 2013 15:18:21 +0000 (17:18 +0200)]
jpeg2000: fix dereferencing invalid pointers

Found-by: Laurent Butti <laurentb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 912ce9dd2080c5837285a471d750fa311e09b555)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/jpeg2000dec: Check cdx/y values more carefully
Michael Niedermayer [Wed, 21 Aug 2013 02:40:50 +0000 (04:40 +0200)]
avcodec/jpeg2000dec: Check cdx/y values more carefully

Some invalid values where not handled correctly in the later pixel
format matching code.
Fixes out of array accesses
Fixes Ticket2848

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8bb11c3ca77b52e05a9ed1496a65f8a76e6e2d8f)

Conflicts:

libavcodec/jpeg2000dec.c

6 years agoavcodec/rpza: Perform pointer advance and checks before using the pointers
Michael Niedermayer [Wed, 21 Aug 2013 23:07:32 +0000 (01:07 +0200)]
avcodec/rpza: Perform pointer advance and checks before using the pointers

Fixes out of array accesses
Fixes Ticket2850

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3819db745da2ac7fb3faacb116788c32f4753f34)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/flashsv: check diff_start/height
Michael Niedermayer [Tue, 20 Aug 2013 21:18:48 +0000 (23:18 +0200)]
avcodec/flashsv: check diff_start/height

Fixes out of array accesses
Fixes Ticket2844

Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 880c73cd76109697447fbfbaa8e5ee5683309446)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agojpeg2000: check log2_cblk dimensions
Michael Niedermayer [Sat, 24 Aug 2013 01:19:40 +0000 (03:19 +0200)]
jpeg2000: check log2_cblk dimensions

Fixes out of array access
Fixes Ticket2895

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9a271a9368eaabf99e6c2046103acb33957e63b7)

6 years agoswr/rematrix: Fix handling of AV_CH_LAYOUT_STEREO_DOWNMIX output
Michael Niedermayer [Tue, 20 Aug 2013 14:56:51 +0000 (16:56 +0200)]
swr/rematrix: Fix handling of AV_CH_LAYOUT_STEREO_DOWNMIX output

Fixes Ticket2859

Note, testcases related to the downmix channels are welcome.
(id like to make sure this is working correctly now, as obviously it didnt
 work before ...)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c56d4dab039b352961cca298d753b04e2f2fd990)

6 years agoswr: clean layouts before checking sanity
Michael Niedermayer [Tue, 20 Aug 2013 14:49:31 +0000 (16:49 +0200)]
swr: clean layouts before checking sanity

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6dfffe92004dfd8c79d18791f28a2b1c7e387845)

6 years agomovenc: ilbc needs audio_vbr set.
Michael Niedermayer [Tue, 20 Aug 2013 11:45:20 +0000 (13:45 +0200)]
movenc: ilbc needs audio_vbr set.

Without this the block_align or bitrate value is not available to the decoder

Fixes Ticket2858

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3d64845600c6486a2706b118a81805f3bf4d3db5)

6 years agoRevert "doc/RELEASE_NOTES: add a note about AVISynth"
Stephen Hutchinson [Mon, 19 Aug 2013 03:14:04 +0000 (23:14 -0400)]
Revert "doc/RELEASE_NOTES: add a note about AVISynth"

This reverts commit 3aa2257d240a5a0eb94014b9113dd91730786886.

6 years agoavisynth: Support video input from AviSynth 2.5 properly.
Stephen Hutchinson [Fri, 16 Aug 2013 21:29:55 +0000 (17:29 -0400)]
avisynth: Support video input from AviSynth 2.5 properly.

Uses the 2.5 compatibility header included with the variant of
FFMS2 that uses AviSynth's C-interface. A copy of this header is
now provided in compat/avisynth.

avs_get_row_size_p and avs_get_height_p changed between versions
2.5 and 2.6. Since the avisynth_c.h header that avformat uses
assumes AviSynth 2.6, it would cause 2.5 to crash if given any
kind of real video (the Version() function was known to work,
though).

AvxSynth was unaffected by this issue because, despite being based
on AviSynth 2.5.8 and using 2.5.8's interface version number of 3,
it actually uses 2.6's versions of these functions.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/g2meet: fix src pointer checks in kempf_decode_tile() n2.0.1
Michael Niedermayer [Wed, 7 Aug 2013 13:50:26 +0000 (15:50 +0200)]
avcodec/g2meet: fix src pointer checks in kempf_decode_tile()

Fixes Ticket2842

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2960576378d17d71cc8dccc926352ce568b5eec1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoupdate for 2.0.1
Michael Niedermayer [Sat, 10 Aug 2013 21:53:37 +0000 (23:53 +0200)]
update for 2.0.1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMAINTAINERS: add Alexander Strasser for the server
Michael Niedermayer [Thu, 8 Aug 2013 20:55:19 +0000 (22:55 +0200)]
MAINTAINERS: add Alexander Strasser for the server

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c11c180132b3e0038143dc9ba4dfd7287d1509c7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMAINTAINERS: remove myself from movenc, 2 maintainers should be enough
Michael Niedermayer [Thu, 8 Aug 2013 14:40:19 +0000 (16:40 +0200)]
MAINTAINERS: remove myself from movenc, 2 maintainers should be enough

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 55a88daf6ff1e09994bff39fac313a38a35b0055)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMAINTAINERS: add myself as maintainer for lavf/aiff* and lavf/movenc.c
Matthieu Bouron [Tue, 6 Aug 2013 21:08:05 +0000 (22:08 +0100)]
MAINTAINERS: add myself as maintainer for lavf/aiff* and lavf/movenc.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 88a1ff22336ebfd62b0d1d920e0e7d49f7bd1ece)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMAINTAINERS: alphabetical sort
Michael Niedermayer [Wed, 7 Aug 2013 00:58:16 +0000 (02:58 +0200)]
MAINTAINERS: alphabetical sort

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 81f4d55c3669733318b2f0e61d10d9efe9b00074)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMAINTAINERS: Add some maintainers for parts of libavutil
Michael Niedermayer [Sun, 4 Aug 2013 09:43:22 +0000 (11:43 +0200)]
MAINTAINERS: Add some maintainers for parts of libavutil

Developers added are active and in the copyright of the specified files,

If anyone wants to maintain anything else, send a patch that adds you to
MAINTAINERS.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b45b1d7af93bd5b8b3824edeae3d1d54644a5361)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMAINTAINERS: order libavutil entries alphabetically
Michael Niedermayer [Sun, 4 Aug 2013 09:24:57 +0000 (11:24 +0200)]
MAINTAINERS: order libavutil entries alphabetically

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 48188a512068e77fbf94ec1a250870260a1ff1ae)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMAINTAINERS: drop 1.1 from the releases that i maintain
Michael Niedermayer [Thu, 11 Jul 2013 10:35:39 +0000 (12:35 +0200)]
MAINTAINERS: drop 1.1 from the releases that i maintain

There seems to be no need to continue maintaining it, people can easily
upgrade to 1.2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5fe5f020b6cfb0b7137d12aab10db936cc08836f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMAINTAINERS: add myself as maintainer for the interface code to swresample & swscale...
Michael Niedermayer [Sat, 3 Aug 2013 10:36:56 +0000 (12:36 +0200)]
MAINTAINERS: add myself as maintainer for the interface code to swresample & swscale in libavfilter

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5ad4e29337483bbd3337bc47db4ad181d7e2da00)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavisynth: Exit gracefully when trying to serve video from v2.5.8.
Stephen Hutchinson [Wed, 7 Aug 2013 00:57:17 +0000 (20:57 -0400)]
avisynth: Exit gracefully when trying to serve video from v2.5.8.

'Fixes' ticket #2526 insofar as it stops 2.5.8 from crashing and
tells the user to upgrade to 2.6 if they want to make video input
work. A real solution to #2526 would be to get video input from
2.5.8 to work right.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9db353bc4727d2a184778c110cf4ea0b9d1616cb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavisynth: Cosmetics
Stephen Hutchinson [Wed, 7 Aug 2013 00:57:16 +0000 (20:57 -0400)]
avisynth: Cosmetics

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f277d6bf42329d481f58b6147f6dc4130f198ba5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agosgidec: safer check for buffer overflow
Paul B Mahol [Fri, 26 Jul 2013 21:53:54 +0000 (21:53 +0000)]
sgidec: safer check for buffer overflow

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 86e722ab97d7f5f0552c8a0958f7910dfcf3c5b7)

Conflicts:

libavcodec/sgidec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agottaenc: fix packet size
Paul B Mahol [Fri, 2 Aug 2013 16:45:58 +0000 (16:45 +0000)]
ttaenc: fix packet size

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit bc2187cfdb5eeb82e3caf42a81a00d1ee4c16d8e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomatroskaenc: simplify mkv_check_tag()
Michael Niedermayer [Wed, 17 Jul 2013 11:30:36 +0000 (13:30 +0200)]
matroskaenc: simplify mkv_check_tag()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 066111bf19518a9f4d836991b34dbfc5ab72a41a)

6 years agolavf/matroskaenc: Check for valid metadata before creating tags
James Almer [Wed, 17 Jul 2013 06:10:16 +0000 (03:10 -0300)]
lavf/matroskaenc: Check for valid metadata before creating tags

Tags must have at least one SimpleTag element to be spec conformant.
Updated lavf-mkv and seek-lavf-mkv FATE references as the tests were affected by
this.

Fixes ticket #2785

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 088ed5314694031e07e02e9d364c9d486a60e704)

6 years agoavfilter/vf_separatefields: fix ;;
Michael Niedermayer [Fri, 19 Jul 2013 22:44:09 +0000 (00:44 +0200)]
avfilter/vf_separatefields: fix ;;

Found-by: llogan
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 74561680cd01f36a2b225efb529bcd5729b65d32)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/paf: Fix integer overflow and out of array read
Michael Niedermayer [Fri, 9 Aug 2013 11:23:10 +0000 (13:23 +0200)]
avformat/paf: Fix integer overflow and out of array read

Found-by: Laurent Butti <laurentb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f58cd2867a8af2eed13acdd21d067b48249b14a1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavutil/mem: Fix flipped condition
Michael Niedermayer [Fri, 9 Aug 2013 11:37:18 +0000 (13:37 +0200)]
avutil/mem: Fix flipped condition

Fixes return code and later null pointer dereference

Found-by: Laurent Butti <laurentb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c94f9e854228e0ea00e1de8769d8d3f7cab84a55)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavfilter: fix plane validity checks
Michael Niedermayer [Sat, 3 Aug 2013 16:54:43 +0000 (18:54 +0200)]
avfilter: fix plane validity checks

Fixes out of array accesses

(cherry picked from commit e43a0a232dbf6d3c161823c2e07c52e76227a1bc)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/kmvc: fix MV checks
Michael Niedermayer [Mon, 29 Jul 2013 18:43:45 +0000 (20:43 +0200)]
avcodec/kmvc: fix MV checks

Fixes Ticket2813
Fixes regression since 70b5583

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3cd8aaa2b2e78faf039691e1c31ff4f8d94e3bc6)

6 years agoRevert "pnm: remove nonsense code"
Paul B Mahol [Sun, 28 Jul 2013 22:00:42 +0000 (00:00 +0200)]
Revert "pnm: remove nonsense code"

Breaks decoding pgms with 255 < maxval < 65535.

Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>.
This reverts commit a0348d0966a81a66f3a1bf061576b24d5296b933.
(cherry picked from commit 768e40b451a459fefaceed6b1b3d6e70c93596ac)

6 years agojpeg2000dec: Support non subsampled 9-16bit planar pixel formats
Michael Niedermayer [Sun, 7 Jul 2013 22:58:40 +0000 (00:58 +0200)]
jpeg2000dec: Support non subsampled 9-16bit planar pixel formats

This applies changes similar to fc6de70c44be05eb0368ab519bfb790431d8dee5
to the >8bit codepath

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1434df3b93fde086be729d174ffbbee1e25792b3)

6 years agojpeg2000dec: silence unused variable warning
Michael Niedermayer [Fri, 19 Jul 2013 15:54:57 +0000 (17:54 +0200)]
jpeg2000dec: silence unused variable warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit db33010483a024f1343bfb516415fe9ef77e82d9)

6 years agojpeg2000dec: Support non subsampled 8bit planar pixel formats
Michael Niedermayer [Sun, 7 Jul 2013 22:58:40 +0000 (00:58 +0200)]
jpeg2000dec: Support non subsampled 8bit planar pixel formats

Fixes file2.jp2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fc6de70c44be05eb0368ab519bfb790431d8dee5)

6 years agojpeg2000dec: parse CDEF
Michael Niedermayer [Sun, 7 Jul 2013 22:57:32 +0000 (00:57 +0200)]
jpeg2000dec: parse CDEF

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Conflicts:

libavcodec/jpeg2000dec.c

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 99de97cabf35c035b628943b865ab991583a6ea5)

6 years agoFix pix_fmt detection in the native jpeg2000 decoder.
Carl Eugen Hoyos [Thu, 18 Jul 2013 08:56:15 +0000 (10:56 +0200)]
Fix pix_fmt detection in the native jpeg2000 decoder.

Based on b7a928b by Michael Bradshaw.
Fixes ticket #2683.

Reviewed-by: Nicolas Bertrand
(cherry picked from commit b39a6bbe7f43710d8e7163757c5aeef596878712)