Do not leave positive values undefined when negative are defined as error

Define positive return values as non errors and leave further meaning undefined
This allows future extensions to use these values

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/avpacket/av_packet_split_side_data: ensure that side data padding is initialized

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utils: add some saftey checks to add_metadata_from_side_data()

This fixes potential overreads with crafted files.

Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/oggdec: favor av_freep() over av_free()

Found-by: Reimar Döffinger
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/exr: favor av_freep() over av_free() for saftey

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/exr: fix null pointer dereference

Fixes CID1108582

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffv1enc: use 64bit in maxsize calculation

This isnt needed but it cant hurt, its also more consistent with
how its calculated a few lines before.

See: CID1108593
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h264_parser: fix order of operations

Fixes CID1108576

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc: fix EOB/EOS check

Fixes: CID1108575
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: inline cabac in residual coding(cherry picked from commit 17d7a880445b72feb36d684ae1f0597195811e97)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: inline cabac in hls_mvd_coding(cherry picked from commit ad387195ad04e8a005a1bfd509e9e4f827e68fa9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc_cabac: trivial simplifications

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc: do not dereference pointer before null check in verify_md5()

Fixes: CID1108607

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc_refs: fix h/vshift calculation in ff_hevc_output_frame()

Fixes CID1108577

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/tiff: remove byte based bpp special case

This case does not work as off is uninitialized and it should be
handled fine by the generic code below

Fixes CID1108608

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/wavpackenc: fix uninitialized ret

Fixes CID1108609

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
HEVC Encoding via libx265

Obviously relies on Anton's HEVC patch set.
Revert "lavc/hevc: mark decoder as experimental"

This reverts commit f2dd45d06c606c41bcbf227ffc47e1ac0ce37d65.