motion_est: convert stride to ptrdiff_t

CC: libav-stable@libav.org
Bug-Id: CID 700556 / CID 700557 / CID 700558
mpegenc: prevent a NULL pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 29261
lavu: move internal define to the only places where it is used
aacdec: avoid an out-of-bounds write

Also move the check in the case it is actually used.

CC: libav-stable@libav.org
Bug-Id: CID 1087090
sol: simplify sol_codec_id()

Bug-Id: CID 1238993
cook: Make sure there is enough extradata

At least 8 bytes are needed (Mono audio).

Bug-Id: CID 741418
CC: libav-stable@libav.org
tiffenc: initialize return value

'ret' can only be used without initialization if s->height <= 0, which can
only happen if avctx->height <= 0, which is validated elsewhere. Doesn't hurt
to still initialize it though.

CC: libav-stable@libav.org
Bug-Id: CID 732296
roqaudio: Always use the frame buffer on flush

Prevent NULL dereference.

CC: libav-stable@libav.org
Bug-Id: CID 703669
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
aacsbr: always initialize max_qmf_subbands

Fixes a wordly warning from clang -Wsometimes-uninitialized.
sidxindex: Write mimeType=audio/mp4 for audio-only representations

This fixes playback with dash.js, when the input is one separate
mp4 file per track.

Signed-off-by: Martin Storsjö <martin@martin.st>
dashenc: Don't segment all video streams when one stream gets a keyframe

This makes sure that segments actually start at a keyframe (and
makes sure we don't split segments twice in a row, with one segment
consisting of only a handful of packets), when one stream uses b-frames
while another one doesn't.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit '9c12c6ff9539e926df0b2a2299e915ae71872600'

* commit '9c12c6ff9539e926df0b2a2299e915ae71872600':
  motion_est: convert stride to ptrdiff_t

Conflicts:
	libavcodec/me_cmp.c
	libavcodec/ppc/me_cmp.c
	libavcodec/x86/me_cmp_init.c

See: 9c669672c7fd45ef1cad782ab551be438ceac6cd
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '065923b0781b06a2604f69f4e2c2407b7750a854'

* commit '065923b0781b06a2604f69f4e2c2407b7750a854':
  mpegenc: prevent a NULL pointer dereference

Not merged, this is not needed, and could hide more serious issues

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

* commit '277ff7f5dc134f1c2dfc4ea0ef3540340482e3d2':
  lavu: move internal define to the only places where it is used

Conflicts:
	libavcodec/h264_cabac.c
	libavutil/internal.h

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

* commit 'b99ca863506f0630514921b740b78364de67a3ff':
  aacdec: avoid an out-of-bounds write

Conflicts:
	libavcodec/aacdec.c

See: ba02069a8e22985a9a775dac9ece6dc54a7e8b44
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b'

* commit '30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b':
  sol: simplify sol_codec_id()

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

* commit '299d8ab104fb350254eb2e6d9ecdce892a2a55b1':
  cook: Make sure there is enough extradata

See: c9e455432988acd414990ba92f782b8e3c4b6aea
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '0562887a984388fdc7a9b71c9374ff9c756fb4f1'

* commit '0562887a984388fdc7a9b71c9374ff9c756fb4f1':
  tiffenc: initialize return value

Conflicts:
	libavcodec/tiffenc.c

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

* commit '55b59fab880a9fcdd30f97c5170af282087ac4f7':
  roqaudio: Always use the frame buffer on flush

Conflicts:
	libavcodec/roqaudioenc.c

See: a1af505d6640a89401f8e9941a38352a1ca49d58
See: c0b17ea106b94f79255f81ec36ea50096e1ae985
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '208f3abb917757743313da0da714e525e03159d2'

* commit '208f3abb917757743313da0da714e525e03159d2':
  aacsbr: always initialize max_qmf_subbands

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