swresample/resample: fix invert_initial_buffer() after flush

Fixes: asan_heap-uaf_2071250_7_139.ogg
Fixes: assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86/vf_noise: move asm code to a separate file

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
doc/filters.texi: fix several typos in the vidstab* sections

Also create an anchor for the unsharp filter, and references to
it in its mentions.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
fate: add mpeg4 tests for frame size changes
avplay: Always free find_stream_info options

CC: libav-stable@libav.org
Bug-Id: CID 1238794
avplay: Always free opts

CC: libav-stable@libav.org
Bug-Id: CID 733793
avprobe: Remove a pointless check

The element is always valid.

CC: libav-stable@libav.org
Bug-Id: CID 732276
avconv: fix leak in filter error

CC: libav-stable@libav.org
Bug-Id: CID 1005311
avconv: check return value

CC: libav-stable@libav.org
Bug-Id: CID 1224275
avformat: Make avformat_free_context handle NULL

Work as the other free()-like functions.

Bug-Id: CID 1087081
CC: libav-stable@libav.org
cmdutils: Use the correct guard

The OptionDef arrays are terminated with a { NULL } element not NULL.

CC: libav-stable@libav.org
Bug-Id: CID 703769
rtmpproto: Add function to read a number response

Packets that contain a number as a result to a rtmp function call are
structured the same way (String, Number, Null, Number). This new method
also includes more bounds checks to better handle packets that are not
structured as expected.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmpproto: Add getStreamLength call to query duration

In (non-live) streams with no metadata, the duration of a stream can
be retrieved by calling the RTMP function getStreamLength with the
playpath. The server will return a positive duration upon the request if
the duration is known, otherwise either no response or a duration of 0
will be returned.

Signed-off-by: Martin Storsjö <martin@martin.st>
avformat/m4vdec: mark as possibly containing discontinuities

This will be needed for the resolution change mpeg4 test

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'f29c226af0ecc34c417b646580a9acd7d8bbaf48'

* commit 'f29c226af0ecc34c417b646580a9acd7d8bbaf48':
  fate: add mpeg4 tests for frame size changes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tests/fate/mpeg4: fix samples path

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'cf83c0173917a44b89a25ea2b435429bbf9ee767'

* commit 'cf83c0173917a44b89a25ea2b435429bbf9ee767':
  avplay: Always free find_stream_info options

Conflicts:
	ffplay.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'e58a140cf91d1a9cdfa3115d73c923dab0e9e7dc'

* commit 'e58a140cf91d1a9cdfa3115d73c923dab0e9e7dc':
  avplay: Always free opts

Conflicts:
	ffplay.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'aeb23fc4549a25ef32ff085d2a76227f90caf403'

* commit 'aeb23fc4549a25ef32ff085d2a76227f90caf403':
  avprobe: Remove a pointless check

Conflicts:
	avprobe.c

No change as the code does not exist in ffprobe

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'c802a2e718fb3619291f310f851f1a1cdcf4f581'

* commit 'c802a2e718fb3619291f310f851f1a1cdcf4f581':
  avconv: fix leak in filter error

Conflicts:
	ffmpeg_filter.c

See: 14369f59c5ad1fb817fb4d94073f31cccf12b556
Merged-by: Michael Niedermayer <michaelni@gmx.at>