Error recognition flags can and should be set directly with AVOptions.
Attach a file by drag & drop or click to upload