hevc_parser: use better math for calculating size in buffer

Signed-off-by: KhasMek <Boushh@gmail.com>
update libavformat from factory

Signed-off-by: KhasMek <Boushh@gmail.com>