AvInputVideo: fix missing frame when transcoding (flush decoder buffer)