Move get_avc_nalsize() and find_start_code() to h264.h

This allows sharing them with the h264 parser

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h264: simplify find_start_code()

this also uses avpriv_find_start_code(), though no speed change is expected as
the area searched is generally small

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h264_parser: rewrite the parse_nal_units() loop logic based on h264.c

Fixes Ticket4011

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc_ps: Check default display window bitstream and skip if invalid

Fixes Ticket4035

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavd/avfoundation: Fix compilation for non MAC OS devices by conditional compilation of screen capture capabilities.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>