ffmpeg.git
5 years agoMerge commit '88626e5af8d006e67189bf10b96b982502a7e8ad'
Michael Niedermayer [Fri, 19 Dec 2014 11:56:08 +0000 (12:56 +0100)]
Merge commit '88626e5af8d006e67189bf10b96b982502a7e8ad'

* commit '88626e5af8d006e67189bf10b96b982502a7e8ad':
  jvdec: check frame dimensions

See: 105654e376a736d243aef4a1d121abebce912e6b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '809c3023b699c54c90511913d3b6140dd2436550'
Michael Niedermayer [Fri, 19 Dec 2014 11:45:56 +0000 (12:45 +0100)]
Merge commit '809c3023b699c54c90511913d3b6140dd2436550'

* commit '809c3023b699c54c90511913d3b6140dd2436550':
  mjpegdec: check for pixel format changes

Conflicts:
libavcodec/mjpegdec.c

See: 5c378d6a6df8243f06c87962b873bd563e58cd39
See: a2f680c7bc7642c687aeb4e14d00ac74833c7a09
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '64f7575fbd64e5b65d5c644347408588c776f1fe'
Michael Niedermayer [Fri, 19 Dec 2014 11:24:36 +0000 (12:24 +0100)]
Merge commit '64f7575fbd64e5b65d5c644347408588c776f1fe'

* commit '64f7575fbd64e5b65d5c644347408588c776f1fe':
  mov: avoid a memleak when multiple stss boxes are present

Conflicts:
libavformat/mov.c

See: 5ab882d7283f57560c889919c35f2688253b1d9c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agojvdec: check frame dimensions
Anton Khirnov [Sun, 14 Dec 2014 20:01:59 +0000 (21:01 +0100)]
jvdec: check frame dimensions

The frame size must be set by the caller and each dimension must be a
multiple of 8.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8542
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
5 years agomjpegdec: check for pixel format changes
Anton Khirnov [Sun, 14 Dec 2014 19:52:13 +0000 (20:52 +0100)]
mjpegdec: check for pixel format changes

Fixes possible invalid memory access.

Based on code by Michael Niedermayer <michaelni@gmx.at>

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8541
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
5 years agomov: avoid a memleak when multiple stss boxes are present
Anton Khirnov [Tue, 12 Aug 2014 14:39:10 +0000 (14:39 +0000)]
mov: avoid a memleak when multiple stss boxes are present

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
5 years agoMerge commit '210461c0a83a5625560fa1d92229200dc7fb869b'
Michael Niedermayer [Fri, 19 Dec 2014 04:37:11 +0000 (05:37 +0100)]
Merge commit '210461c0a83a5625560fa1d92229200dc7fb869b'

* commit '210461c0a83a5625560fa1d92229200dc7fb869b':
  imgconvert: check memory allocations and propagate errors

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '596b5c488fa1d40f114a64d3b73e1863cab073fb'
Michael Niedermayer [Fri, 19 Dec 2014 04:36:20 +0000 (05:36 +0100)]
Merge commit '596b5c488fa1d40f114a64d3b73e1863cab073fb'

* commit '596b5c488fa1d40f114a64d3b73e1863cab073fb':
  wma: check memory allocations and propagate errors

Conflicts:
libavcodec/wma.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '63be97ec403023fb664798432acedaf6e6922527'
Michael Niedermayer [Fri, 19 Dec 2014 04:15:40 +0000 (05:15 +0100)]
Merge commit '63be97ec403023fb664798432acedaf6e6922527'

* commit '63be97ec403023fb664798432acedaf6e6922527':
  lavfi: always check av_expr_parse_and_eval() return value

not merged, this is incorrect

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '9e06327ecb8f73c7904d10af7ad339c57cdaa788'
Michael Niedermayer [Fri, 19 Dec 2014 04:13:59 +0000 (05:13 +0100)]
Merge commit '9e06327ecb8f73c7904d10af7ad339c57cdaa788'

* commit '9e06327ecb8f73c7904d10af7ad339c57cdaa788':
  xcbgrab: Move NULL check before pointer dereference

Conflicts:
libavdevice/xcbgrab.c

See: e86df0206f06b8d1e97e2b60db8f74a398d53127
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '5ac06633cb63fcc51f2471a3478b44d3f010b16b'
Michael Niedermayer [Fri, 19 Dec 2014 04:06:07 +0000 (05:06 +0100)]
Merge commit '5ac06633cb63fcc51f2471a3478b44d3f010b16b'

* commit '5ac06633cb63fcc51f2471a3478b44d3f010b16b':
  takdec: check av_samples_get_buffer_size() return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '16c7a8a142277aa3c98b4802ee57daaebe6999e5'
Michael Niedermayer [Fri, 19 Dec 2014 04:04:43 +0000 (05:04 +0100)]
Merge commit '16c7a8a142277aa3c98b4802ee57daaebe6999e5'

* commit '16c7a8a142277aa3c98b4802ee57daaebe6999e5':
  aacps: invert the order of parameters of ipdopd_reset()

See: 9f36ec6aa936515a703f6d7ff32826aa28684f1e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b'
Michael Niedermayer [Fri, 19 Dec 2014 04:04:19 +0000 (05:04 +0100)]
Merge commit '76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b'

* commit '76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b':
  rtsp: check ffurl_get_file_handle() return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'b1306823d0b3ae998c8e10ad832004eb13bdd93e'
Michael Niedermayer [Fri, 19 Dec 2014 03:57:25 +0000 (04:57 +0100)]
Merge commit 'b1306823d0b3ae998c8e10ad832004eb13bdd93e'

* commit 'b1306823d0b3ae998c8e10ad832004eb13bdd93e':
  check memory errors from av_strdup()

Conflicts:
avprobe.c
libavformat/matroskaenc.c
libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '9745f19ffc9031ce480e43d7cf1053b58100d70f'
Michael Niedermayer [Fri, 19 Dec 2014 03:53:39 +0000 (04:53 +0100)]
Merge commit '9745f19ffc9031ce480e43d7cf1053b58100d70f'

* commit '9745f19ffc9031ce480e43d7cf1053b58100d70f':
  assdec: check the right variable

Conflicts:
libavcodec/assdec.c

See: cc7342f712c0822c3e8f4c36fc55632c59aabac9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '971099ff5a85377579eb5b8d3620e283957f097e'
Michael Niedermayer [Fri, 19 Dec 2014 03:44:39 +0000 (04:44 +0100)]
Merge commit '971099ff5a85377579eb5b8d3620e283957f097e'

* commit '971099ff5a85377579eb5b8d3620e283957f097e':
  aacenc: correctly check returned value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'ac467d94fa6d9d626f77d4ca8125a5eb1ad5425d'
Michael Niedermayer [Fri, 19 Dec 2014 03:43:53 +0000 (04:43 +0100)]
Merge commit 'ac467d94fa6d9d626f77d4ca8125a5eb1ad5425d'

* commit 'ac467d94fa6d9d626f77d4ca8125a5eb1ad5425d':
  lcl: return an appropriate error code

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '8b263331c5ebbb10b6ea521e9fd56751ba94254b'
Michael Niedermayer [Fri, 19 Dec 2014 03:42:59 +0000 (04:42 +0100)]
Merge commit '8b263331c5ebbb10b6ea521e9fd56751ba94254b'

* commit '8b263331c5ebbb10b6ea521e9fd56751ba94254b':
  mpegts: check get16() return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '430a8168594b3cb29f44141d4da88f2c642de06f'
Michael Niedermayer [Fri, 19 Dec 2014 03:36:27 +0000 (04:36 +0100)]
Merge commit '430a8168594b3cb29f44141d4da88f2c642de06f'

* commit '430a8168594b3cb29f44141d4da88f2c642de06f':
  oggdec: add support for VP8 demuxing

Conflicts:
Changelog
libavformat/oggparsevp8.c
libavformat/version.h

See: d890db5f537bdfc9d73e7fdac1ff4216e5a43fc2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '38129c26c51b933d7db423f904ba0cd6a88ca1ed'
Michael Niedermayer [Fri, 19 Dec 2014 03:30:25 +0000 (04:30 +0100)]
Merge commit '38129c26c51b933d7db423f904ba0cd6a88ca1ed'

* commit '38129c26c51b933d7db423f904ba0cd6a88ca1ed':
  cmdutils: check file access functions return values

Conflicts:
cmdutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'c63dd3f0a48a9f6389d253597ab51caddc0118db'
Michael Niedermayer [Fri, 19 Dec 2014 03:21:13 +0000 (04:21 +0100)]
Merge commit 'c63dd3f0a48a9f6389d253597ab51caddc0118db'

* commit 'c63dd3f0a48a9f6389d253597ab51caddc0118db':
  a64multi: check elbg return values

Conflicts:
libavcodec/a64multienc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '3beb9cbad35218ed1fb3473eeb3cfc97a931bff4'
Michael Niedermayer [Fri, 19 Dec 2014 03:19:58 +0000 (04:19 +0100)]
Merge commit '3beb9cbad35218ed1fb3473eeb3cfc97a931bff4'

* commit '3beb9cbad35218ed1fb3473eeb3cfc97a931bff4':
  roqvideo: check memory allocations and propagate errors

Conflicts:
libavcodec/roqvideoenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'ae2d41ec875965ce4ab9fdd88a5e8ba57cada67a'
Michael Niedermayer [Fri, 19 Dec 2014 03:10:17 +0000 (04:10 +0100)]
Merge commit 'ae2d41ec875965ce4ab9fdd88a5e8ba57cada67a'

* commit 'ae2d41ec875965ce4ab9fdd88a5e8ba57cada67a':
  elbg: check memory allocations and propagate errors

Conflicts:
libavcodec/elbg.c
libavcodec/elbg.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '5d839778b9f3edb682b7f71dde4f80f07c75b098'
Michael Niedermayer [Fri, 19 Dec 2014 02:57:12 +0000 (03:57 +0100)]
Merge commit '5d839778b9f3edb682b7f71dde4f80f07c75b098'

* commit '5d839778b9f3edb682b7f71dde4f80f07c75b098':
  lavu: Refactor side data wiping

Conflicts:
libavutil/frame.c

See: a400edbb6d00c0211de38e4f1b4f593681db91d8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'effa7d2a6a260ca3ce801c180ee6131d67d665fb'
Michael Niedermayer [Fri, 19 Dec 2014 02:42:43 +0000 (03:42 +0100)]
Merge commit 'effa7d2a6a260ca3ce801c180ee6131d67d665fb'

* commit 'effa7d2a6a260ca3ce801c180ee6131d67d665fb':
  fate: add test for offset theora

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '67fc8a15e4182ea111cfcd05897709f09d99a33a'
Michael Niedermayer [Fri, 19 Dec 2014 02:42:16 +0000 (03:42 +0100)]
Merge commit '67fc8a15e4182ea111cfcd05897709f09d99a33a'

* commit '67fc8a15e4182ea111cfcd05897709f09d99a33a':
  theora: support different visible and coded frame size

Conflicts:
libavcodec/vp3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'a381e0cec87bcb28ebc05fe840bb937a495de736'
Michael Niedermayer [Fri, 19 Dec 2014 02:31:08 +0000 (03:31 +0100)]
Merge commit 'a381e0cec87bcb28ebc05fe840bb937a495de736'

* commit 'a381e0cec87bcb28ebc05fe840bb937a495de736':
  fate: add a DPX parser test

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '87bd298abeb901fe16383a0d267502cc7fc03878'
Michael Niedermayer [Fri, 19 Dec 2014 02:29:30 +0000 (03:29 +0100)]
Merge commit '87bd298abeb901fe16383a0d267502cc7fc03878'

* commit '87bd298abeb901fe16383a0d267502cc7fc03878':
  DPX parser

Conflicts:
libavcodec/dpx_parser.c
libavcodec/version.h

See: 8ec328668a7d10c8224ae5f591add5b388ea82ed
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '3a3790b8f8b56ee6abc93ccac280eb693675e294'
Michael Niedermayer [Fri, 19 Dec 2014 02:13:31 +0000 (03:13 +0100)]
Merge commit '3a3790b8f8b56ee6abc93ccac280eb693675e294'

* commit '3a3790b8f8b56ee6abc93ccac280eb693675e294':
  tiff: support encoding and decoding 64bit images

Conflicts:
libavcodec/tiff.c
libavcodec/tiffenc.c
libavcodec/version.h

See: c714cd3bd4af70e0cba1db399ca420b1f51a773d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '59f0275dd0a42a7f90271a83a78e9ca5e69ff5b0'
Michael Niedermayer [Fri, 19 Dec 2014 01:56:45 +0000 (02:56 +0100)]
Merge commit '59f0275dd0a42a7f90271a83a78e9ca5e69ff5b0'

* commit '59f0275dd0a42a7f90271a83a78e9ca5e69ff5b0':
  movenc: Adjust the pts of new fragments similarly to what is done for dts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '8a70ef94b9c377293b3dfa7d92cdc81a4fe1543a'
Michael Niedermayer [Fri, 19 Dec 2014 01:49:36 +0000 (02:49 +0100)]
Merge commit '8a70ef94b9c377293b3dfa7d92cdc81a4fe1543a'

* commit '8a70ef94b9c377293b3dfa7d92cdc81a4fe1543a':
  libavformat: Add a muxer wrapping mpegts encoding into RTP

Conflicts:
Changelog
libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f'
Michael Niedermayer [Fri, 19 Dec 2014 01:33:15 +0000 (02:33 +0100)]
Merge commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f'

* commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f':
  rtp: Initial H.261 support

Conflicts:
Changelog
libavformat/rtpdec_h261.c
libavformat/rtpenc_h261.c
libavformat/sdp.c
libavformat/version.h

See: 50a4d5cfc6749932347ee38c25b5040aea4b13a0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'adc214e6797750285a5e62634b8521db521162ad'
Michael Niedermayer [Fri, 19 Dec 2014 01:24:02 +0000 (02:24 +0100)]
Merge commit 'adc214e6797750285a5e62634b8521db521162ad'

* commit 'adc214e6797750285a5e62634b8521db521162ad':
  rtpenc: Avoid brittle switch fallthroughs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '3bb465245fed6069512e6821000391beae8a6066'
Michael Niedermayer [Fri, 19 Dec 2014 01:15:19 +0000 (02:15 +0100)]
Merge commit '3bb465245fed6069512e6821000391beae8a6066'

* commit '3bb465245fed6069512e6821000391beae8a6066':
  h261dec: Fix context initialization sequence

See: 6c1ee1a11446abbe662fc89b9dff0f0a3d5fdd55
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoqdm2: Allow hard-coding VLC tables.
Reimar Döffinger [Sun, 7 Sep 2014 11:55:23 +0000 (13:55 +0200)]
qdm2: Allow hard-coding VLC tables.

Also adds a lot of infrastructure necessary for it.
Some of it is a bit ugly though.
Increases binary size for hardcoded tables by about 12 kB,
which is about 15 kB from qdm2_table minus data and code
saved that was only used for creating it.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
5 years agoaacps.c: Move large arrays to context to reduce stack usage.
Reimar Döffinger [Sat, 22 Nov 2014 20:26:45 +0000 (21:26 +0100)]
aacps.c: Move large arrays to context to reduce stack usage.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
5 years agoimgconvert: check memory allocations and propagate errors
Vittorio Giovara [Wed, 17 Dec 2014 15:01:45 +0000 (16:01 +0100)]
imgconvert: check memory allocations and propagate errors

5 years agowma: check memory allocations and propagate errors
Vittorio Giovara [Wed, 17 Dec 2014 15:01:46 +0000 (16:01 +0100)]
wma: check memory allocations and propagate errors

5 years agolavfi: always check av_expr_parse_and_eval() return value
Vittorio Giovara [Wed, 17 Dec 2014 14:19:43 +0000 (15:19 +0100)]
lavfi: always check av_expr_parse_and_eval() return value

CC: libav-stable@libav.org
Bug-Id: CID 703624

5 years agoxcbgrab: Move NULL check before pointer dereference
Vittorio Giovara [Wed, 17 Dec 2014 14:19:41 +0000 (15:19 +0100)]
xcbgrab: Move NULL check before pointer dereference

Bug-Id: CID 1254668

5 years agotakdec: check av_samples_get_buffer_size() return value
Vittorio Giovara [Wed, 17 Dec 2014 14:19:42 +0000 (15:19 +0100)]
takdec: check av_samples_get_buffer_size() return value

CC: libav-stable@libav.org
Bug-Id: CID 747734

5 years agoaacps: invert the order of parameters of ipdopd_reset()
Vittorio Giovara [Wed, 17 Dec 2014 14:19:40 +0000 (15:19 +0100)]
aacps: invert the order of parameters of ipdopd_reset()

This is the order that the caller uses in the rest of the file. The
same operation is applied to both parameters, so this change is only
done for consistency, it doesn't change the actual behaviour.

Bug-Id: CID 732285 / CID 732286

5 years agortsp: check ffurl_get_file_handle() return value
Vittorio Giovara [Wed, 17 Dec 2014 14:19:39 +0000 (15:19 +0100)]
rtsp: check ffurl_get_file_handle() return value

CC: libav-stable@libav.org
Bug-Id: CID 717844

5 years agocheck memory errors from av_strdup()
Vittorio Giovara [Wed, 17 Dec 2014 13:53:45 +0000 (14:53 +0100)]
check memory errors from av_strdup()

5 years agoassdec: check the right variable
Vittorio Giovara [Wed, 17 Dec 2014 13:53:44 +0000 (14:53 +0100)]
assdec: check the right variable

CC: libav-stable@libav.org
Bug-Id: CID 1257815

5 years agoaacenc: correctly check returned value
Vittorio Giovara [Wed, 17 Dec 2014 13:53:43 +0000 (14:53 +0100)]
aacenc: correctly check returned value

CC: libav-stable@libav.org
5 years agolcl: return an appropriate error code
Vittorio Giovara [Wed, 17 Dec 2014 13:53:42 +0000 (14:53 +0100)]
lcl: return an appropriate error code

5 years agompegts: check get16() return value
Vittorio Giovara [Wed, 17 Dec 2014 13:53:41 +0000 (14:53 +0100)]
mpegts: check get16() return value

And break flow of execution rather than exiting the function.

CC: libav-stable@libav.org
Bug-Id: CID 732186

5 years agooggdec: add support for VP8 demuxing
James Almer [Fri, 12 Dec 2014 20:57:43 +0000 (20:57 +0000)]
oggdec: add support for VP8 demuxing

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
5 years agocmdutils: check file access functions return values
Vittorio Giovara [Tue, 16 Dec 2014 09:43:48 +0000 (10:43 +0100)]
cmdutils: check file access functions return values

CC: libav-stable@libav.org
Bug-Id: CID 703706

5 years agoa64multi: check elbg return values
Vittorio Giovara [Tue, 16 Dec 2014 09:33:38 +0000 (10:33 +0100)]
a64multi: check elbg return values

5 years agoroqvideo: check memory allocations and propagate errors
Vittorio Giovara [Tue, 16 Dec 2014 09:33:37 +0000 (10:33 +0100)]
roqvideo: check memory allocations and propagate errors

5 years agoelbg: check memory allocations and propagate errors
Vittorio Giovara [Tue, 16 Dec 2014 09:33:36 +0000 (10:33 +0100)]
elbg: check memory allocations and propagate errors

5 years agolavu: Refactor side data wiping
Luca Barbato [Mon, 15 Dec 2014 19:38:00 +0000 (20:38 +0100)]
lavu: Refactor side data wiping

And make sure the nb_side_data field is reset as well.

Based on an initial patch from wm4 <nfxjfg@googlemail.com>.

CC: libav-stable@libav.org
5 years agofate: add test for offset theora
Vittorio Giovara [Fri, 12 Dec 2014 03:35:46 +0000 (03:35 +0000)]
fate: add test for offset theora

5 years agotheora: support different visible and coded frame size
Vittorio Giovara [Fri, 12 Dec 2014 20:27:46 +0000 (20:27 +0000)]
theora: support different visible and coded frame size

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
5 years agofate: add a DPX parser test
Vittorio Giovara [Mon, 1 Dec 2014 15:20:10 +0000 (16:20 +0100)]
fate: add a DPX parser test

5 years agoDPX parser
Paul B Mahol [Mon, 1 Dec 2014 15:20:09 +0000 (16:20 +0100)]
DPX parser

Additional improvements and fixes by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
5 years agotiff: support encoding and decoding 64bit images
Carl Eugen Hoyos [Wed, 10 Dec 2014 18:16:09 +0000 (18:16 +0000)]
tiff: support encoding and decoding 64bit images

5 years agomovenc: Adjust the pts of new fragments similarly to what is done for dts
Martin Storsjö [Sun, 23 Nov 2014 21:23:43 +0000 (23:23 +0200)]
movenc: Adjust the pts of new fragments similarly to what is done for dts

The pts and the corresponding duration is written in sidx
atoms, thus make sure these match up correctly.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agolibavformat: Add a muxer wrapping mpegts encoding into RTP
Martin Storsjö [Mon, 9 May 2011 13:44:54 +0000 (16:44 +0300)]
libavformat: Add a muxer wrapping mpegts encoding into RTP

Since this structurally is quite different from normal RTP
(multiple streams are muxed into one single mpegts stream,
which is packetized into one single RTP session), it is kept
as a separate muxer.

Since this structurally also behaves differently than normal
RTP, all of the other muxers that do chained RTP muxing
(rtsp, sap, mp4) would need to be updated similarly to handle
this - in particular, creating one single rtp_mpegts muxer
for the whole presentation instead of one rtp muxer per stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortp: Initial H.261 support
Thomas Volkert [Sat, 6 Dec 2014 18:54:07 +0000 (19:54 +0100)]
rtp: Initial H.261 support

The packetizer only supports splitting at GOB headers - if
such aren't available frequently enough, it splits at any
random byte offset (not at a macroblock boundary either, which
would be allowed by the spec) and sends a payload header pretend
that it starts with a GOB header.

As long as a receiver doesn't try to handle such cases cleverly
but just drops broken frames, this shouldn't matter too much
in practice.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpenc: Avoid brittle switch fallthroughs
Martin Storsjö [Thu, 18 Dec 2014 10:20:11 +0000 (12:20 +0200)]
rtpenc: Avoid brittle switch fallthroughs

Instead explicitly jump to the default case in the cases where
it is wanted, and avoid fallthrough between different codecs,
which could easily introduce bugs if people editing the code
aren't careful.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoh261dec: Fix context initialization sequence
Michael Niedermayer [Fri, 15 Aug 2014 00:50:41 +0000 (02:50 +0200)]
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>
5 years agoavfilter/lut: reduce dereference in the inner loop
Yayoi [Thu, 18 Dec 2014 08:08:54 +0000 (00:08 -0800)]
avfilter/lut: reduce dereference in the inner loop

For rgb, with a 1080p source, 69 to 74fps on core i5(2 core, 1.8GHz),
and 136 to 160 fps on an core i7(4770R, 3.2Ghz)
Changed the yuv code for consistency, even though the performance
increase is not as obvious as rgb

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '91bfac759dfd536e439ad3e35964705012c6a5a7'
Michael Niedermayer [Thu, 18 Dec 2014 19:54:47 +0000 (20:54 +0100)]
Merge commit '91bfac759dfd536e439ad3e35964705012c6a5a7'

* commit '91bfac759dfd536e439ad3e35964705012c6a5a7':
  h261enc: Disallow sliced encoding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8'
Michael Niedermayer [Thu, 18 Dec 2014 19:40:34 +0000 (20:40 +0100)]
Merge commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8'

* commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8':
  rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '42181740a3972e17d0097d28fabc9a1a60322d47'
Michael Niedermayer [Thu, 18 Dec 2014 19:30:07 +0000 (20:30 +0100)]
Merge commit '42181740a3972e17d0097d28fabc9a1a60322d47'

* commit '42181740a3972e17d0097d28fabc9a1a60322d47':
  rtpenc: Set the AVFMT_TS_NONSTRICT flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '01f251c44d83eedc819625d2caac9ff9697a085d'
Michael Niedermayer [Thu, 18 Dec 2014 19:22:01 +0000 (20:22 +0100)]
Merge commit '01f251c44d83eedc819625d2caac9ff9697a085d'

* commit '01f251c44d83eedc819625d2caac9ff9697a085d':
  rtpenc: Set the timestamp properly when sending mpegts data, too

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'f2c614e8c4a935b52bbf86819128d9e797230c20'
Michael Niedermayer [Thu, 18 Dec 2014 18:58:59 +0000 (19:58 +0100)]
Merge commit 'f2c614e8c4a935b52bbf86819128d9e797230c20'

* commit 'f2c614e8c4a935b52bbf86819128d9e797230c20':
  srtpproto: fix option flag type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/indeo3: ensure offsets are non negative
Michael Niedermayer [Thu, 18 Dec 2014 17:57:27 +0000 (18:57 +0100)]
avcodec/indeo3: ensure offsets are non negative

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavfilter/vf_spp: add gbrp support
Michael Niedermayer [Thu, 18 Dec 2014 16:46:35 +0000 (17:46 +0100)]
avfilter/vf_spp: add gbrp support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavfilter/vf_spp: add gray8 support
Michael Niedermayer [Thu, 18 Dec 2014 16:43:10 +0000 (17:43 +0100)]
avfilter/vf_spp: add gray8 support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavfilter/vf_spp: Fix pointer type warning
Michael Niedermayer [Thu, 18 Dec 2014 15:54:18 +0000 (16:54 +0100)]
avfilter/vf_spp: Fix pointer type warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/adpcm: Check idelta
Michael Niedermayer [Thu, 18 Dec 2014 15:09:31 +0000 (16:09 +0100)]
avcodec/adpcm: Check idelta

Fixes integer overflow
Fixes: signal_sigsegv_1b0a4da_1865_cov_2167818389_computer_anger.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh261enc: Disallow sliced encoding
Martin Storsjö [Wed, 17 Dec 2014 10:18:03 +0000 (12:18 +0200)]
h261enc: Disallow sliced encoding

This avoids trying to do sliced encoding, even if a slice/packet
size is requested (via the -ps option or the rtp_payload_size
field), since the encoder currently doesn't support it (or at least
our decoder can't decode it, even if the h261_encode_gob_header
function is hooked up to be called from the slicing part in
mpegvideo_enc.c).

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpdec_h263_rfc2190: Clear the stored bits if discarding buffered data
Martin Storsjö [Wed, 17 Dec 2014 11:50:06 +0000 (13:50 +0200)]
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>
5 years agortpenc: Set the AVFMT_TS_NONSTRICT flag
Martin Storsjö [Fri, 12 Dec 2014 16:57:38 +0000 (18:57 +0200)]
rtpenc: Set the AVFMT_TS_NONSTRICT flag

In particular, when packetizing mpegts into rtp, the input packet
timestamp may come from more than one stream, which could cause
multiple packets be written with the same timestamp.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortpenc: Set the timestamp properly when sending mpegts data, too
Martin Storsjö [Mon, 9 May 2011 13:44:37 +0000 (16:44 +0300)]
rtpenc: Set the timestamp properly when sending mpegts data, too

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agosrtpproto: fix option flag type
Tristan Matthews [Tue, 16 Dec 2014 19:07:53 +0000 (14:07 -0500)]
srtpproto: fix option flag type

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoavcodec/h264: Check *log2_weight_denom
Michael Niedermayer [Thu, 18 Dec 2014 02:16:39 +0000 (03:16 +0100)]
avcodec/h264: Check *log2_weight_denom

Fixes undefined behavior
Fixes: signal_sigsegv_14768d2_2248_cov_3629497219_h264_h264___pi_20070614T182942.h264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/hevc_ps: Check diff_cu_qp_delta_depth
Michael Niedermayer [Thu, 18 Dec 2014 01:09:23 +0000 (02:09 +0100)]
avcodec/hevc_ps: Check diff_cu_qp_delta_depth

Fixes undefined behavior
Fixes: asan_static-oob_17aa046_582_cov_1577759978_DBLK_G_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/hevc: move qp_block_mask to where its used
Michael Niedermayer [Thu, 18 Dec 2014 00:55:02 +0000 (01:55 +0100)]
avcodec/hevc: move qp_block_mask to where its used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agowavdec: RIFX file format support
Thomas Volkert [Wed, 17 Dec 2014 11:04:37 +0000 (12:04 +0100)]
wavdec: RIFX file format support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/h264: Clear delayed_pic on deallocation
Michael Niedermayer [Wed, 17 Dec 2014 20:27:37 +0000 (21:27 +0100)]
avcodec/h264: Clear delayed_pic on deallocation

Fixes use of freed memory

Fixes: case5_av_frame_copy_props.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/hevc: clear filter_slice_edges() on allocation
Michael Niedermayer [Wed, 17 Dec 2014 18:42:57 +0000 (19:42 +0100)]
avcodec/hevc: clear filter_slice_edges() on allocation

This avoids use of uninitialized memory
Fixes: asan_static-oob_17aa046_582_cov_212287884_DBLK_G_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/dcadec: Check that the added xch channel isnt already there
Michael Niedermayer [Wed, 17 Dec 2014 14:33:05 +0000 (15:33 +0100)]
avcodec/dcadec: Check that the added xch channel isnt already there

Fixes null pointer dereference
Fixes: signal_sigsegv_369609d_623_cov_2008234281_ES_6.1_16bit.dts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '456e93bfdd4cbc5e995dea415019abd0703d0e16'
Michael Niedermayer [Wed, 17 Dec 2014 10:57:35 +0000 (11:57 +0100)]
Merge commit '456e93bfdd4cbc5e995dea415019abd0703d0e16'

* commit '456e93bfdd4cbc5e995dea415019abd0703d0e16':
  dashenc: Adjust the start time of a segment to the end of the previous segment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '2f628d5943c12389c07d652d23d3916997f9f0f6'
Michael Niedermayer [Wed, 17 Dec 2014 10:36:23 +0000 (11:36 +0100)]
Merge commit '2f628d5943c12389c07d652d23d3916997f9f0f6'

* commit '2f628d5943c12389c07d652d23d3916997f9f0f6':
  dashenc: Write segment timelines properly if the timeline has gaps

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodashenc: Adjust the start time of a segment to the end of the previous segment
Martin Storsjö [Fri, 28 Nov 2014 08:43:53 +0000 (10:43 +0200)]
dashenc: Adjust the start time of a segment to the end of the previous segment

This is the same adjustment that the mp4 muxer does to the start
timestamp of fragments, since the timestamp of a sample in an mp4
file is implicit from the sum of earlier sample durations.

This avoids gaps in the timeline (which can stop dash.js from
playing it back), and makes sure the timestamp on the segmenter
level matches what the mp4 muxer actually writes into the segments.

This is only an issue if the AVPacket duration of the last
packet of a segment doesn't point to the actual start timestamp
of the next packet (the first in the next segment).

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agodashenc: Write segment timelines properly if the timeline has gaps
Martin Storsjö [Fri, 28 Nov 2014 08:40:05 +0000 (10:40 +0200)]
dashenc: Write segment timelines properly if the timeline has gaps

Write a new start time if the duration of the previous segment
didn't match the start of the next one. Check that segments
actually are continuous before writing a repeat count.

This makes sure timestamps deduced from the timeline actually
match the real start timestamp as written in filenames (if
using a template containing $Time$).

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoavcodec/imc: dont read bits beyond the end
Michael Niedermayer [Wed, 17 Dec 2014 03:51:06 +0000 (04:51 +0100)]
avcodec/imc: dont read bits beyond the end

Fixes use of uninitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/utils: check the private context class
Michael Niedermayer [Wed, 17 Dec 2014 02:28:25 +0000 (03:28 +0100)]
avcodec/utils: check the private context class

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/indeo3: use signed variables to avoid underflow
Michael Niedermayer [Wed, 17 Dec 2014 02:14:21 +0000 (03:14 +0100)]
avcodec/indeo3: use signed variables to avoid underflow

Fixes out of array read
Fixes: signal_sigsegv_1b0a4da_1865_cov_2167818389_computer_anger.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoflacenc: calculate lower sum levels in-place.
Reimar Döffinger [Sat, 22 Nov 2014 19:05:08 +0000 (20:05 +0100)]
flacenc: calculate lower sum levels in-place.

Should improve cache usage and reduces stack usage.
Also reduces number of copies in case many levels
have the same number of bits.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
5 years agolibavutil: cosmetic: inserted spaces wherever necessary
Supraja Meedinti [Tue, 16 Dec 2014 20:31:42 +0000 (02:01 +0530)]
libavutil: cosmetic: inserted spaces wherever necessary

Signed-off-by: Supraja Meedinti <supraja0493@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/h264: make the first field of H264Context an AVClass
Michael Niedermayer [Wed, 17 Dec 2014 00:31:48 +0000 (01:31 +0100)]
avcodec/h264: make the first field of H264Context an AVClass

Fixes use of freed memory
Fixes: asan_heap-uaf_3660f67_757_cov_1257014655_Hi422FR1_SONY_A.jsv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoswscale: increase yuv2rgb table headroom
Michael Niedermayer [Tue, 16 Dec 2014 21:21:21 +0000 (22:21 +0100)]
swscale: increase yuv2rgb table headroom

Fixes out of array access
Fixes: case2_bad_read_yuv2rgbx32.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/mov: fix integer overflow of size
Michael Niedermayer [Tue, 16 Dec 2014 20:29:27 +0000 (21:29 +0100)]
avformat/mov: fix integer overflow of size

Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/mov: check atom nesting depth
Michael Niedermayer [Tue, 16 Dec 2014 20:14:40 +0000 (21:14 +0100)]
avformat/mov: check atom nesting depth

Fixes call stack overflow
Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>