lavf/matroska*: DiscardPadding is a signed integer

according to the Matriska Specification
 http://matroska.org/technical/specs/index.html
DiscardPadding is a signed integer.

Tested-by: Jan Gerber <j@v2v.cc>
Tested-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf/matroskadec ReferenceBlock is a signed integer

according to the Matroska Specification
ReferenceBlock is a signed integer too.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec: Fix duration error after seek operation

After seek, s->duration need recalculation, AVCodecParserContext need be set
again. Without the fix, the first audio packet would be dropped after
compute_pkt_fields() as the final pts/dts become invalid.

Signed-off-by: wangxingchao <wangxingchao@xiaomi.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/rtmphttp: Partial fix for the ticket #3127 (second try)

Reviewed-by: Lukasz M <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: Do not fill gap before the first decodable frame on single stream input files unless the user explicitly requests it.

Fixes different behavior to JM and probably several if not all
reference decoders.

We cannot just do this unconditionally as it would ruin AV sync in
some use cases.

Bug-Found-by: BugMaster
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/x86/vp9dsp: use EXTERNAL_* macros.

Original fix by one of these developers:
    Anton Khirnov <anton@khirnov.net>
    Diego Biurrun <diego@biurrun.de>
    Luca Barbato <lu_zero@gentoo.org>
    Martin Storsjö <martin@martin.st>

See 97962b2 / 72ca830

Personnal guess is Diego Biurrun.
avcodec/vp9: make last_invisible local.

Original change by one of these developers:
    Anton Khirnov <anton@khirnov.net>
    Diego Biurrun <diego@biurrun.de>
    Luca Barbato <lu_zero@gentoo.org>
    Martin Storsjö <martin@martin.st>

See 97962b2 / 72ca830
cosmetic shit part 1
unternary inv_recenter_nonneg
move vp9_decode_{free,flush}
reduce diff in vp9_decode_free
cosmetic shit part 2
remove fb
more cosmetics weirdness
sanity check in inter_reconn
pass vp9 ctx and block instead of full codec ctx to decode_mode
partition sanity check in decode_sb
remove various resets. huh?
change tile_size type.

size can probably go negative
extra sanity check in update_size