I tried to fix our internal bitstream filtering on muxing using this code
it works in sense it stopped crashing and adding simple filter like dump_extra makes file a bit bigger.
But complex stuff like cropping or rotation still does not work :-(
not sure, may be we need to add those options via av_dict_set too ?