After some struggle and different build i've managed to have it compile.
However now there is a more intriguing issue that i cannot find how to solve.
ffplay -vcodec h264_mmal /mnt/mmcblk0p2/video/Big_Buck_Bunny_1080p_surround_FrostWire.com.avi
ffplay version 3.1.3 Copyright (c) 2003-2016 the FFmpeg developers
built with gcc 7.1.0 (piCore)
configuration: --prefix=/usr/local --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --enable-libass --enable-libcelt --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --disable-libopencore-amrnb --disable-libopencore-amrwb --enable-libopenh264 --disable-libopus --enable-libspeex --enable-libtwolame --disable-libvorbis --enable-libvpx --enable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --disable-libxvid --enable-opengl --enable-openssl --disable-neon --enable-omx --enable-omx-rpi --enable-mmal --extra-cflags='-march=armv8-a+crc -mfpu=neon-fp-armv8 -mtune=cortex-a53'
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, avi, from '/mnt/mmcblk0p2/video/Big_Buck_Bunny_1080p_surround_FrostWire.com.avi':
Metadata:
encoder : AVI-Mux GUI 1.17.7, Aug 8 2006 20:59:17
JUNK :
Duration: 00:09:56.46, start: 0.000000, bitrate: 12455 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 12001 kb/s, 24 fps, 24 tbr, 24 tbn, 24 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
SDL_OpenAudio (6 channels, 48000 Hz): Couldn't open audio device: No such file or directory
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
SDL_OpenAudio (4 channels, 48000 Hz): Couldn't open audio device: No such file or directory
ALSA lib pcm.c:8251:(snd_pcm_recover) underrun occurred
[h264_mmal @ 0x72232950] Did not get output frame from MMAL.f=0/0
[h264_mmal @ 0x72232950] Did not get output frame from MMAL.f=0/0
[h264_mmal @ 0x72232950] Did not get output frame from MMAL.f=0/0
[h264_mmal @ 0x72232950] Did not get output frame from MMAL.f=0/0
[h264_mmal @ 0x72232950] Did not get output frame from MMAL.f=0/0
[h264_mmal @ 0x72232950] Did not get output frame from MMAL.f=0/0