Apparently ffmpeg doesn't like how we were feeding the SPS/PPS to it. At least this way it works. There is still something wrong. Instead of directly starting to work after the SPS/PPS is received (from MPEG-TS), it waits 1 extra I frame. If I just output the SPS/PPS directly instead of reinserting it, it works directly after the SPS/PPS is received on the I frame directly following them.
Apparently ffmpeg doesn't like how we were feeding the SPS/PPS to it. At least this way it works. There is still something wrong. Instead of directly starting to work after the SPS/PPS is received (from MPEG-TS), it waits 1 extra I frame. If I just output the SPS/PPS directly instead of reinserting it, it works directly after the SPS/PPS is received on the I frame directly following them.

vlc-mirror/vlc-2.1,jomanmuk/vlc-2.2,xkfz007/vlc,jomanmuk/vlc-2.2,krichter722/vlc,shyamalschandra/vlc,vlc-mirror/vlc,shyamalschandra/vlc,vlc-mirror/vlc-2.1,vlc-mirror/vlc-2.1,jomanmuk/vlc-2.2,vlc-mirror/vlc,krichter722/vlc,jomanmuk/vlc-2.2,vlc-mirror/vlc-2.1,jomanmuk/vlc-2.2,shyamalschandra/vlc,jomanmuk/vlc-2.1,jomanmuk/vlc-2.2,xkfz007/vlc,vlc-mirror/vlc,vlc-mirror/vlc-2.1,jomanmuk/vlc-2.1,jomanmuk/vlc-2.1,krichter722/vlc,xkfz007/vlc,vlc-mirror/vlc,krichter722/vlc,xkfz007/vlc,vlc-mirror/vlc,vlc-mirror/vlc,shyamalschandra/vlc,krichter722/vlc,jomanmuk/vlc-2.1,xkfz007/vlc,xkfz007/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,krichter722/vlc,vlc-mirror/vlc,shyamalschandra/vlc,krichter722/vlc,shyamalschandra/vlc,vlc-mirror/vlc-2.1,shyamalschandra/vlc,jomanmuk/vlc-2.1,xkfz007/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.1